Difference between revisions of "2018 AMC 10B Problems/Problem 20"

m (Solution 4 (Finite Differences))
(Reformatted answer choices and made sols for professional. In addition, I prioritize the nonbashing solutions, and decide to rewrite Sol 2 somehow. Credits will retain to original authors. Let me know if you are unhappy with it.)
Line 5: Line 5:
 
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) } 2016 \qquad \textbf{(B) } 2017 \qquad \textbf{(C) } 2018 \qquad \textbf{(D) } 2019 \qquad \textbf{(E) } 2020</math>
  
==Solution 1 (A Bit Bashy)==
+
==Solution 1 (Algebra)==
Start out by listing some terms of the sequence.
+
<b>IN CONSTRUCTION</b>
<cmath>f(1)=1</cmath>
 
<cmath>f(2)=1</cmath>
 
 
 
<cmath>f(3)=3</cmath>
 
<cmath>f(4)=6</cmath>
 
<cmath>f(5)=8</cmath>
 
<cmath>f(6)=8</cmath>
 
<cmath>f(7)=7</cmath>
 
<cmath>f(8)=7</cmath>
 
 
 
<cmath>f(9)=9</cmath>
 
<cmath>f(10)=12</cmath>
 
<cmath>f(11)=14</cmath>
 
<cmath>f(12)=14</cmath>
 
<cmath>f(13)=13</cmath>
 
<cmath>f(14)=13</cmath>
 
 
 
<cmath>f(15)=15</cmath>
 
<cmath>.....</cmath>
 
Notice that <math>f(n)=n</math> whenever <math>n</math> is an odd multiple of <math>3</math>, and the pattern of numbers that follow will always be <math>+2</math>, <math>+3</math>, <math>+2</math>, <math>+0</math>, <math>-1</math>, <math>+0</math>.
 
The largest odd multiple of <math>3</math> smaller than <math>2018</math> is <math>2013</math>, so we have
 
<cmath>f(2013)=2013</cmath>
 
<cmath>f(2014)=2016</cmath>
 
<cmath>f(2015)=2018</cmath>
 
<cmath>f(2016)=2018</cmath>
 
<cmath>f(2017)=2017</cmath>
 
<cmath>f(2018)=\boxed{(B) 2017}.</cmath>
 
minor edits by bunny1
 
  
==Solution 2 (Bashy Pattern Finding)==
+
~MRENTHUSIASM
Writing out the first few values, we get:
 
<math>1,1,3,6,8,8,7,7,9,12,14,14,13,13,15,18,20,20,19,19...</math>. Examining, we see that every number <math>x</math> where <math>x \equiv 1\pmod 6</math> has <math>f(x)=x</math>, <math>f(x+1)=f(x)=x</math>, and <math>f(x-1)=f(x-2)=x+1</math>. The greatest number that's <math>1\pmod{6}</math> and less <math>2018</math> is <math>2017</math>, so we have <math>f(2017)=f(2018)=2017.</math> <math>\boxed B</math>
 
  
==Solution 3 (Algebra)==
+
==Solution 2 (Algebra)==
<cmath>f(n)=f(n-1)-f(n-2)+n.</cmath>
+
<b>IN CONSTRUCTION</b>
<cmath>f(n-1)=f(n-2)-f(n-3)+n-1.</cmath>
 
Adding the two equations, we have that <cmath>f(n)=2n-1-f(n-3).</cmath>
 
Hence, <math>f(n)+f(n-3)=2n-1</math>.
 
After plugging in <math>n-3</math> to the equation above and doing some algebra, we have that <math>f(n)-f(n-6)=6</math>.
 
Consequently,
 
<cmath>f(2018)-f(2012)=6.</cmath>
 
<cmath>f(2012)-f(2006)=6.</cmath>
 
<cmath>\ldots</cmath>
 
<cmath>f(8)-f(2)=6.</cmath>
 
Adding these <math>336</math> equations up, we have that <math>f(2018)-f(2)=6 \cdot 336</math> and <math>f(2018)=\boxed{2017}</math>.
 
  
~AopsUser101
+
~AopsUser101 ~MRENTHUSIASM
  
==Solution 4 (Finite Differences)==
+
==Solution 3 (Finite Differences)==
  
 
Preamble: In this solution, we define the sequence <math>A</math> to satisfy <math>a_n = f(n),</math> where <math>a_n</math> represents the <math>n</math>th term of the sequence <math>A.</math> This solution will show a few different perspectives. Even though it may not be as quick as some of the solutions above, I feel like it is an interesting concept, and may be more motivated.  
 
Preamble: In this solution, we define the sequence <math>A</math> to satisfy <math>a_n = f(n),</math> where <math>a_n</math> represents the <math>n</math>th term of the sequence <math>A.</math> This solution will show a few different perspectives. Even though it may not be as quick as some of the solutions above, I feel like it is an interesting concept, and may be more motivated.  
 
————————————————
 
  
 
To begin, we consider the sequence <math>B</math> formed when we take the difference of consecutive terms between <math>A.</math> Define <math>b_n = a_{n+1} - a_n.</math> Notice that for <math>n \ge 4,</math> we have <cmath>\begin{cases} a_{n+1} = a_{n} - a_{n-1} + (n+1) \\ a_{n} = a_{n-1} - a_{n-2} + n. \end{cases}</cmath> Notice that subtracting the second equation from the first, we see that <math>b_{n} = b_{n-1} - b_{n-2} + 1.</math>  
 
To begin, we consider the sequence <math>B</math> formed when we take the difference of consecutive terms between <math>A.</math> Define <math>b_n = a_{n+1} - a_n.</math> Notice that for <math>n \ge 4,</math> we have <cmath>\begin{cases} a_{n+1} = a_{n} - a_{n-1} + (n+1) \\ a_{n} = a_{n-1} - a_{n-2} + n. \end{cases}</cmath> Notice that subtracting the second equation from the first, we see that <math>b_{n} = b_{n-1} - b_{n-2} + 1.</math>  
Line 71: Line 29:
 
Now, there are two ways to finish.  
 
Now, there are two ways to finish.  
  
Finish Method #1: Notice that any six consecutive terms of <math>B</math> sum to <math>6,</math> after which we see that <math>a_n = a_{n-6} + 6.</math> Therefore, <math>a_{2018} = a_{2012} + 6 = \cdots = a_{2} + 2016 = \boxed{2017}.</math>
+
Finish Method #1: Notice that any six consecutive terms of <math>B</math> sum to <math>6,</math> after which we see that <math>a_n = a_{n-6} + 6.</math> Therefore, <math>a_{2018} = a_{2012} + 6 = \cdots = a_{2} + 2016 = \boxed{\textbf{(B) } 2017}.</math>
  
Finish Method #2: Notice that <math>a_{2018} = a_{2017} - a_{2016} + 2018 = B_{2016} + 2018 = -1 + 2018 = \boxed{2017}.</math>  
+
Finish Method #2: Notice that <math>a_{2018} = a_{2017} - a_{2016} + 2018 = B_{2016} + 2018 = -1 + 2018 = \boxed{\textbf{(B) } 2017}.</math>  
  
 
~ Professor-Mom
 
~ Professor-Mom
 +
 +
==Solution 4 (Bash)==
 +
Start out by listing some terms of the sequence.
 +
<cmath>\begin{align*}
 +
f(1)&=1 \\
 +
f(2)&=1 \\
 +
f(3)&=3 \\
 +
f(4)&=6 \\
 +
f(5)&=8 \\
 +
f(6)&=8 \\
 +
f(7)&=7 \\
 +
f(8)&=7 \\
 +
f(9)&=9 \\
 +
f(10)&=12 \\
 +
f(11)&=14 \\
 +
f(12)&=14 \\
 +
f(13)&=13 \\
 +
f(14)&=13 \\
 +
f(15)&=15 \\
 +
&\cdots
 +
\end{align*}</cmath>
 +
Notice that <math>f(n)=n</math> whenever <math>n</math> is an odd multiple of <math>3</math>, and the pattern of numbers that follow will always be <math>+2</math>, <math>+3</math>, <math>+2</math>, <math>+0</math>, <math>-1</math>, <math>+0</math>.
 +
The largest odd multiple of <math>3</math> smaller than <math>2018</math> is <math>2013</math>, so we have
 +
<cmath>\begin{align*}
 +
f(2013)&=2013 \\
 +
f(2014)&=2016 \\
 +
f(2015)&=2018 \\
 +
f(2016)&=2018 \\
 +
f(2017)&=2017 \\
 +
f(2018)&=\boxed{\textbf{(B) } 2017}.
 +
\end{align*}</cmath>
 +
minor edits by bunny1
 +
 +
==Solution 5 (Bash)==
 +
Writing out the first few values, we get:
 +
<math>1,1,3,6,8,8,7,7,9,12,14,14,13,13,15,18,20,20,19,19,\ldots</math>. Examining, we see that every number <math>x</math> where <math>x \equiv 1\pmod 6</math> has <math>f(x)=x</math>, <math>f(x+1)=f(x)=x</math>, and <math>f(x-1)=f(x-2)=x+1</math>. The greatest number that's <math>1\pmod{6}</math> and less <math>2018</math> is <math>2017</math>, so we have <math>f(2017)=f(2018)=\boxed{\textbf{(B) } 2017}</math>.
  
 
==Video Solution==
 
==Video Solution==

Revision as of 18:04, 24 September 2021

The following problem is from both the 2018 AMC 12B #18 and 2018 AMC 10B #20, so both problems redirect to this page.

Problem

A function $f$ is defined recursively by $f(1)=f(2)=1$ and \[f(n)=f(n-1)-f(n-2)+n\]for all integers $n \geq 3$. What is $f(2018)$?

$\textbf{(A) } 2016 \qquad \textbf{(B) } 2017 \qquad \textbf{(C) } 2018 \qquad \textbf{(D) } 2019 \qquad \textbf{(E) } 2020$

Solution 1 (Algebra)

IN CONSTRUCTION

~MRENTHUSIASM

Solution 2 (Algebra)

IN CONSTRUCTION

~AopsUser101 ~MRENTHUSIASM

Solution 3 (Finite Differences)

Preamble: In this solution, we define the sequence $A$ to satisfy $a_n = f(n),$ where $a_n$ represents the $n$th term of the sequence $A.$ This solution will show a few different perspectives. Even though it may not be as quick as some of the solutions above, I feel like it is an interesting concept, and may be more motivated.

To begin, we consider the sequence $B$ formed when we take the difference of consecutive terms between $A.$ Define $b_n = a_{n+1} - a_n.$ Notice that for $n \ge 4,$ we have \[\begin{cases} a_{n+1} = a_{n} - a_{n-1} + (n+1) \\ a_{n} = a_{n-1} - a_{n-2} + n. \end{cases}\] Notice that subtracting the second equation from the first, we see that $b_{n} = b_{n-1} - b_{n-2} + 1.$

If you didn’t notice that $B$ repeated directly in the solution above, you could also, possibly more naturally, take the finite differences of the sequence $b_n$ so that you could define $c_n = b_{n+1} - b_n.$ Using a similar method as above through reindexing and then subtracting, you could find that $c_n = c_{n-1} - c_{n-2}.$ The sum of any six consecutive terms of a sequence which satisfies such a recursion is $0,$ in which you have that $b_{n} = b_{n+6}.$ In the case in which finite differences didn’t reduce to such a special recursion, you could still find the first few terms of $C$ to see if there are any patterns, now that you have a much simpler sequence. Doing so in this case, it can also be seen by seeing that the sequence $C$ looks like \[\underbrace{2, 1, -1, -2, -1, 1,}_{\text{cycle period}} 2, 1, -1, -2, -1, 1, \cdots\] in which the same result follows.

Using the fact that $B$ repeats every six terms, this motivates us to look at the sequence $B$ more carefully. Doing so, we see that $B$ looks like \[\underbrace{2, 3, 2, 0, -1, 0,}_{\text{cycle period}} 2, 3, 2, 0, -1, 0, \cdots\] (If you tried pattern finding on sequence $B$ directly, you could also arrive at this result, although I figured defining a second sequence based on finite differences was more motivated.)

Now, there are two ways to finish.

Finish Method #1: Notice that any six consecutive terms of $B$ sum to $6,$ after which we see that $a_n = a_{n-6} + 6.$ Therefore, $a_{2018} = a_{2012} + 6 = \cdots = a_{2} + 2016 = \boxed{\textbf{(B) } 2017}.$

Finish Method #2: Notice that $a_{2018} = a_{2017} - a_{2016} + 2018 = B_{2016} + 2018 = -1 + 2018 = \boxed{\textbf{(B) } 2017}.$

~ Professor-Mom

Solution 4 (Bash)

Start out by listing some terms of the sequence. \begin{align*} f(1)&=1 \\ f(2)&=1 \\ f(3)&=3 \\ f(4)&=6 \\ f(5)&=8 \\ f(6)&=8 \\  f(7)&=7 \\ f(8)&=7 \\ f(9)&=9 \\ f(10)&=12 \\ f(11)&=14 \\ f(12)&=14 \\ f(13)&=13 \\ f(14)&=13 \\ f(15)&=15 \\ &\cdots \end{align*} Notice that $f(n)=n$ whenever $n$ is an odd multiple of $3$, and the pattern of numbers that follow will always be $+2$, $+3$, $+2$, $+0$, $-1$, $+0$. The largest odd multiple of $3$ smaller than $2018$ is $2013$, so we have \begin{align*} f(2013)&=2013 \\ f(2014)&=2016 \\ f(2015)&=2018 \\ f(2016)&=2018 \\ f(2017)&=2017 \\ f(2018)&=\boxed{\textbf{(B) } 2017}. \end{align*} minor edits by bunny1

Solution 5 (Bash)

Writing out the first few values, we get: $1,1,3,6,8,8,7,7,9,12,14,14,13,13,15,18,20,20,19,19,\ldots$. Examining, we see that every number $x$ where $x \equiv 1\pmod 6$ has $f(x)=x$, $f(x+1)=f(x)=x$, and $f(x-1)=f(x-2)=x+1$. The greatest number that's $1\pmod{6}$ and less $2018$ is $2017$, so we have $f(2017)=f(2018)=\boxed{\textbf{(B) } 2017}$.

Video Solution

https://www.youtube.com/watch?v=aubDsjVFFTc

~bunny1

https://youtu.be/ub6CdxulWfc

~savannahsolver

See Also

2018 AMC 10B (ProblemsAnswer KeyResources)
Preceded by
Problem 19
Followed by
Problem 21
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
All AMC 10 Problems and Solutions
2018 AMC 12B (ProblemsAnswer KeyResources)
Preceded by
Problem 17
Followed by
Problem 19
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
All AMC 12 Problems and Solutions

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. AMC logo.png