AMC12 2017 A
AMC12 2017 A · Q7
AMC12 2017 A · Q7. It mainly tests Sequences & recursion (algebra), Patterns & sequences (misc).
Define a function on the positive integers recursively by $f(1) = 2$, $f(n) = f(n-1) + 1$ if $n$ is even, and $f(n) = f(n-2) + 2$ if $n$ is odd and greater than 1. What is $f(2017)$?
在正整数上定义一个递归函数:$f(1) = 2$,如果 $n$ 是偶数则 $f(n) = f(n-1) + 1$,如果 $n$ 是奇数且大于 1 则 $f(n) = f(n-2) + 2$。$f(2017)$ 是多少?
(A)
2017
2017
(B)
2018
2018
(C)
4034
4034
(D)
4035
4035
(E)
4036
4036
Answer
Correct choice: (B)
正确答案:(B)
Solution
It is clear after listing the first few values, $f(1) = 2$, $f(2) = f(1) + 1 = 3$, $f(3) = f(1) + 2 = 4$, $f(4) = f(3) + 1 = 5$, and so on, that $f(n) = n + 1$ for all positive integers $n$. Indeed, the function is uniquely determined by the recursive description, and the function defined by $f(n) = n + 1$ fits the description. Therefore $f(2017) = 2018$.
列出前几个值显然,$f(1) = 2$,$f(2) = f(1) + 1 = 3$,$f(3) = f(1) + 2 = 4$,$f(4) = f(3) + 1 = 5$,依此类推,对所有正整数 $n$ 有 $f(n) = n + 1$。的确,这个函数由递归定义唯一确定,而 $f(n) = n + 1$ 符合该描述。因此 $f(2017) = 2018$。
Topics
Related Questions
Practice full AMC exams on amcdrill.
Try full-length practice and diagnostics at www.amcdrill.com.