Skip to main content

2017 AMC 12A Problem 7

Problem 7 of 25EasierAlgebraProblem-Solving Techniques

Define a function on the positive integers recursively by f(1)=2,f(1)=2, f(n)=f(n−1)+1f(n)=f(n-1)+1 if nn is even, and f(n)=f(n−2)+2f(n)=f(n-2)+2 if nn is odd and greater than 1.1. What is f(2017)?f(2017)?

Answer choices

Show solution

Solution

Listing values: f(1)=2,f(1)=2, f(2)=f(1)+1=3,f(2)=f(1)+1=3, f(3)=f(1)+2=4,f(3)=f(1)+2=4, f(4)=f(3)+1=5,f(4)=f(3)+1=5, suggesting f(n)=n+1.f(n)=n+1. Both rules are consistent with f(n)=n+1:f(n)=n+1: for even n,n, (n−1)+1+1=n+1,(n-1)+1+1=n+1, and for odd n,n, (n−2)+1+2=n+1.(n-2)+1+2=n+1. Since the recursion determines ff uniquely, f(2017)=2018.f(2017)=2018. Thus, the correct answer is B.
AoPS wiki

Tagged: recursion · pattern recognition

More practice