2017 AMC 12A Problem 7

Attempt Problem 7 of the 2017 AMC 12A below, then check your answer against the professionally curated solution from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2017 AMC 12A solutions, or check the answer key.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

7.

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)?
20172017
20182018
40344034
40354035
40364036
Answer: B
Concepts:recursionpattern recognition
Small hint:
Compute f(1),f(2),f(3),…f(1),f(2),f(3),\ldots and look for a pattern
Big hint:
Check that f(n)=n+1f(n)=n+1 satisfies both recursive rules
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.
LIVE by Po-Shen Loh
Programs

LIVE Classes

Self-Paced Classes

Stars

Scholarship

About Us

Who Is Po-Shen Loh?

Email Contact

Newsletter

Jobs

Become a Star

For a more Thought Full world.

© 2026 Expii, Inc.