Difference between revisions of "2017 AMC 12A Problems/Problem 7"

(Problem)
Line 1: Line 1:
 +
==Problem==
 +
 
Define a function on the positive integers recursively by <math>f(1) = 2</math>, <math>f(n) = f(n-1) + 2</math> if <math>n</math> is even, and <math>f(n) = f(n-2) + 2</math> if <math>n</math> is odd and greater than <math>1</math>. What is <math>f(2017)</math>?
 
Define a function on the positive integers recursively by <math>f(1) = 2</math>, <math>f(n) = f(n-1) + 2</math> if <math>n</math> is even, and <math>f(n) = f(n-2) + 2</math> if <math>n</math> is odd and greater than <math>1</math>. What is <math>f(2017)</math>?
 +
 +
<math> \textbf{(A)}\ 2017 \qquad\textbf{(B)}\ 2018 \qquad\textbf{(C)}\ 4034 \qquad\textbf{(D)}\ 4035 \qquad\textbf{(E)}\ 4036 </math>

Revision as of 15:48, 8 February 2017

Problem

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

$\textbf{(A)}\ 2017 \qquad\textbf{(B)}\ 2018 \qquad\textbf{(C)}\ 4034 \qquad\textbf{(D)}\ 4035 \qquad\textbf{(E)}\ 4036$