All About 2018 -- A

Algebra Level 3

A function f f is defined recursively by f ( 1 ) = f ( 2 ) = 1 f(1) = f(2)=1 and f ( n ) = f ( n 1 ) f ( n 2 ) + n f(n)=f(n-1)-f(n-2)+n for all integers n 3 n \ge 3 .

What is f ( 2018 ) f(2018) ?


Try also


The answer is 2017.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

X X
Jun 7, 2018

Define g ( x ) = f ( x ) x g(x)=f(x)-x .

Because f ( n ) = f ( n 1 ) f ( n 2 ) + n f(n)=f(n-1)-f(n-2)+n

f ( n ) n = ( f ( n 1 ) ( n 1 ) ) ( f ( n 2 ) ( n 2 ) ) + 1 , g ( n ) = g ( n 1 ) g ( n 2 ) + 1 f(n)-n=(f(n-1)-(n-1))-(f(n-2)-(n-2))+1,g(n)=g(n-1)-g(n-2)+1 .So,

g ( 1 ) = 0 , g ( 2 ) = 1 , g ( 3 ) = 0 , g ( 4 ) = 2 , g ( 5 ) = 3 , g ( 6 ) = 2 g(1)=0,g(2)=-1,g(3)=0,g(4)=2,g(5)=3,g(6)=2

g ( 7 ) = 0 , g ( 8 ) = 1 , g ( 9 ) = 0 , g ( 10 ) = 2 , g ( 11 ) = 3 , g ( 12 ) = 2 g(7)=0,g(8)=-1,g(9)=0,g(10)=2,g(11)=3,g(12)=2

\vdots

g ( 2017 ) = 0 , g ( 2018 ) = 1 , . . . g(2017)=0,g(2018)=-1,...

f ( 2018 ) = g ( 2018 ) + 2018 = 2017 f(2018)=g(2018)+2018=2017

f ( n ) = f ( n 1 ) f ( n 2 ) + n f ( n + 1 ) = f ( n ) f ( n 1 ) + n + 1 = f ( n 2 ) + 2 n + 1 f ( n + 2 ) = f ( n 1 ) + 2 n + 3 f ( n + 3 ) = f ( n ) + 2 n + 5 f ( n + 4 ) = f ( n + 1 ) + 2 n + 7 = f ( n 2 ) + 6 Replace n 2 with n f ( n + 6 ) = f ( n ) + 6 f ( 6 m + a ) = 6 m + f ( a ) where a < 6 , m N f ( N ) = 6 N 6 + f ( N m o d 6 ) f ( 2018 ) = 6 × 336 + f ( 2 ) = 2016 + 1 = 2017 \begin{aligned} f(n) & = f(n-1)-f(n-2)+n \\ f(n+1) & = f(n) - f(n-1) + n+1 = - f(n-2) + 2n+1 \\ f(n+2) & = - f(n-1)+2n+3 \\ f(n+3) & = - f(n) + 2n + 5 \\ f(n+4) & = - f(n+1)+2n + 7 = f(n-2) + 6 & \small \color{#3D99F6} \text{Replace }n-2 \text{ with }n \\ \implies f(n+6) & = f(n) + 6 \\ f(6m+a) & = 6m + f(a) & \small \color{#3D99F6} \text {where }a < 6, m \in \mathbb N \\ \implies f(N) & = 6 \left\lfloor \frac N6\right\rfloor + f(N \bmod 6) \\ f(2018) & = 6\times 336 + f(2) = 2016 + 1 = \boxed{2017} \end{aligned}

If one lists out the values of f ( n ) f(n) for the first twenty natural numbers, as I did, you may notice an interesting pattern. At the numbers n = 1 , 3 , 7 , 9 , 13 , 15 , 19 , . . . n = 1, 3, 7, 9, 13, 15, 19, ... , f ( n ) = n f(n) = n . Notice how the spacing between these numbers alternates between 2 and 4 ( 3 1 = 2 , 7 3 = 4 , 9 7 = 2 , 13 9 = 4 , . . . 3 - 1 = 2, 7 - 3 = 4, 9 - 7 = 2, 13 - 9 = 4, ... ). I conjectured that this pattern would continue.

Continuing this pattern we eventually find that f ( n ) = n f(n) = n when n = 2017 n = 2017 and when n = 2019 n = 2019 . Thus, f ( 2019 ) = f ( 2018 ) f ( 2017 ) + 2019 2019 = f ( 2018 ) 2017 + 2019 f ( 2018 ) = 2017 f(2019) = f(2018) - f(2017) + 2019 \rightarrow 2019 = f(2018) - 2017 + 2019 \rightarrow \boxed{f(2018) = 2017}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...