Difference between revisions of "2018 AMC 10B Problems/Problem 20"
(Created page with "A function <math>f</math> is defined recursively by <math>f(1)=f(2)=1</math> and <cmath>f(n)=f(n-1)-f(n-2)+n</cmath>for all integers <math>n \geq 3</math>. What is <math>f(201...") |
|||
Line 1: | Line 1: | ||
+ | ==Problem== | ||
+ | |||
A function <math>f</math> is defined recursively by <math>f(1)=f(2)=1</math> and <cmath>f(n)=f(n-1)-f(n-2)+n</cmath>for all integers <math>n \geq 3</math>. What is <math>f(2018)</math>? | A function <math>f</math> is defined recursively by <math>f(1)=f(2)=1</math> and <cmath>f(n)=f(n-1)-f(n-2)+n</cmath>for all integers <math>n \geq 3</math>. What is <math>f(2018)</math>? | ||
<math>\textbf{(A)} \text{ 2016} \qquad \textbf{(B)} \text{ 2017} \qquad \textbf{(C)} \text{ 2018} \qquad \textbf{(D)} \text{ 2019} \qquad \textbf{(E)} \text{ 2020}</math> | <math>\textbf{(A)} \text{ 2016} \qquad \textbf{(B)} \text{ 2017} \qquad \textbf{(C)} \text{ 2018} \qquad \textbf{(D)} \text{ 2019} \qquad \textbf{(E)} \text{ 2020}</math> | ||
+ | |||
+ | ==Solution== | ||
+ | <math>f\left(n\right) = f\left(n - 1\right) - f\left(n - 2\right) + n</math> | ||
+ | |||
+ | <math>= \left(f\left(n - 2\right) - f\left(n - 3\right) + n - 1\right) - f\left(n - 2\right) + n</math> | ||
+ | |||
+ | <math>= 2n - 1 - f\left(n - 3\right)</math> | ||
+ | |||
+ | <math>= 2n - 1 - \left(2\left(n - 3\right) - 1 - f\left(n - 6\right)\right)</math> | ||
+ | |||
+ | <math>= f\left(n - 6\right) + 6</math> | ||
+ | |||
+ | Thus, <math>f\left(2018\right) = 2016 + f\left(2\right) = 2017</math>. <math>\boxed{B}</math> |
Revision as of 15:16, 16 February 2018
Problem
A function is defined recursively by and for all integers . What is ?
Solution
Thus, .