MathDB
Modulo Ackermann

Source: 2015 amc 12b #20

February 26, 2015
functioninductionalgebradomainratiogeometric sequenceAMC

Problem Statement

For every positive integer nn, let mod5(n)\operatorname{mod_5}(n) be the remainder obtained when nn is divided by 55. Define a function f:{0,1,2,3,}×{0,1,2,3,4}{0,1,2,3,4}f : \{0, 1, 2, 3, \dots\} \times \{0, 1, 2, 3, 4\} \to \{0, 1, 2, 3, 4\} recursively as follows: f(i,j)={mod5(j+1)if i=0 and 0j4f(i1,1)if i1 and j=0, andf(i1,f(i,j1))if i1 and 1j4f(i, j) = \begin{cases} \operatorname{mod_5}(j+1) & \text{if }i=0\text{ and }0\leq j\leq 4 \\ f(i-1, 1) & \text{if }i\geq 1\text{ and }j=0 \text{, and}\\ f(i-1, f(i, j-1)) & \text{if }i\geq 1\text{ and }1\leq j\leq 4 \end{cases} What is f(2015,2)f(2015, 2)?
<spanclass=latexbold>(A)</span>0<spanclass=latexbold>(B)</span>1<spanclass=latexbold>(C)</span>2<spanclass=latexbold>(D)</span>3<spanclass=latexbold>(E)</span>4<span class='latex-bold'>(A) </span>0 \qquad<span class='latex-bold'>(B) </span>1 \qquad<span class='latex-bold'>(C) </span>2 \qquad<span class='latex-bold'>(D) </span>3 \qquad<span class='latex-bold'>(E) </span>4