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 ≥ 3 .
What is f ( 2 0 1 8 ) ?
Try also
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.
f ( n ) f ( n + 1 ) f ( n + 2 ) f ( n + 3 ) f ( n + 4 ) ⟹ f ( n + 6 ) f ( 6 m + a ) ⟹ f ( N ) f ( 2 0 1 8 ) = f ( n − 1 ) − f ( n − 2 ) + n = f ( n ) − f ( n − 1 ) + n + 1 = − f ( n − 2 ) + 2 n + 1 = − f ( n − 1 ) + 2 n + 3 = − f ( n ) + 2 n + 5 = − f ( n + 1 ) + 2 n + 7 = f ( n − 2 ) + 6 = f ( n ) + 6 = 6 m + f ( a ) = 6 ⌊ 6 N ⌋ + f ( N m o d 6 ) = 6 × 3 3 6 + f ( 2 ) = 2 0 1 6 + 1 = 2 0 1 7 Replace n − 2 with n where a < 6 , m ∈ N
If one lists out the values of 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 , 1 3 , 1 5 , 1 9 , . . . , f ( n ) = n . Notice how the spacing between these numbers alternates between 2 and 4 ( 3 − 1 = 2 , 7 − 3 = 4 , 9 − 7 = 2 , 1 3 − 9 = 4 , . . . ). I conjectured that this pattern would continue.
Continuing this pattern we eventually find that f ( n ) = n when n = 2 0 1 7 and when n = 2 0 1 9 . Thus, f ( 2 0 1 9 ) = f ( 2 0 1 8 ) − f ( 2 0 1 7 ) + 2 0 1 9 → 2 0 1 9 = f ( 2 0 1 8 ) − 2 0 1 7 + 2 0 1 9 → f ( 2 0 1 8 ) = 2 0 1 7
Problem Loading...
Note Loading...
Set Loading...
Define g ( x ) = f ( x ) − x .
Because 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 .So,
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 ( 1 0 ) = 2 , g ( 1 1 ) = 3 , g ( 1 2 ) = 2
⋮
g ( 2 0 1 7 ) = 0 , g ( 2 0 1 8 ) = − 1 , . . .
f ( 2 0 1 8 ) = g ( 2 0 1 8 ) + 2 0 1 8 = 2 0 1 7