Problem

2015 AMC 12B Problem 20

For every positive integer n, let \text{mod}_5 (n) be the remainder obtained when n is divided by 5. Define a function f: \{0,1,2,3,\ldots\} \times \{0,1,2,3,4\} \to \{0,1,2,3,4\} recursively as follows:

f(i,j) = \begin{cases}\text{mod}_5 (j+1) & \text{ if } i = 0 \text{ and } 0 \le j \le 4 \text{,}\\ f(i-1,1) & \text{ if } i \ge 1 \text{ and } j = 0 \text{, and} \\ f(i-1, f(i,j-1)) & \text{ if } i \ge 1 \text{ and } 1 \le j \le 4. \end{cases}

What is f(2015,2)?

\textbf{(A)}\; 0 \qquad\textbf{(B)}\; 1 \qquad\textbf{(C)}\; 2 \qquad\textbf{(D)}\; 3 \qquad\textbf{(E)}\; 4


Full credit goes to MAA for authoring these problems. These problems were taken on the AOPS website.


Show/Hide Problem Tags

Problem Tags: Algebra

Want to contribute problems and receive full credit? Click here to add your problem!
Please report any issues to us in our Discord server
Go to previous contest problem (SHIFT + Left Arrow) Go to next contest problem (SHIFT + Right Arrow)