{"status": "success", "data": {"description_md": "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:\n\n$$f(i,j) = \\begin{cases}\\text{mod}_5 (j+1) & \\text{ if } i = 0 \\text{ and } 0 \\le j \\le 4 \\text{,}\\\\<br>f(i-1,1) & \\text{ if } i \\ge 1 \\text{ and } j = 0 \\text{, and} \\\\<br>f(i-1, f(i,j-1)) & \\text{ if } i \\ge 1 \\text{ and } 1 \\le j \\le 4.<br>\\end{cases}$$  <br>What is $f(2015,2)$?\n\n$\\textbf{(A)}\\; 0 \\qquad\\textbf{(B)}\\; 1 \\qquad\\textbf{(C)}\\; 2 \\qquad\\textbf{(D)}\\; 3 \\qquad\\textbf{(E)}\\; 4$\n___\nFull credit goes to [MAA](https://maa.org/) for authoring these problems. These problems were taken on the [AOPS](https://artofproblemsolving.com/) website.", "description_html": "<p>For every positive integer  <span class=\"katex--inline\">n</span> , let  <span class=\"katex--inline\">\\text{mod}_5 (n)</span>  be the remainder obtained when  <span class=\"katex--inline\">n</span>  is divided by 5. Define a function  <span class=\"katex--inline\">f: \\{0,1,2,3,\\ldots\\} \\times \\{0,1,2,3,4\\} \\to \\{0,1,2,3,4\\}</span>  recursively as follows:</p>&#10;<p> <span class=\"katex--display\">f(i,j) = \\begin{cases}\\text{mod}_5 (j+1) &amp; \\text{ if } i = 0 \\text{ and } 0 \\le j \\le 4 \\text{,}\\\\f(i-1,1) &amp; \\text{ if } i \\ge 1 \\text{ and } j = 0 \\text{, and} \\\\f(i-1, f(i,j-1)) &amp; \\text{ if } i \\ge 1 \\text{ and } 1 \\le j \\le 4.\\end{cases}</span>   <br/>What is  <span class=\"katex--inline\">f(2015,2)</span> ?</p>&#10;<p> <span class=\"katex--inline\">\\textbf{(A)}\\; 0 \\qquad\\textbf{(B)}\\; 1 \\qquad\\textbf{(C)}\\; 2 \\qquad\\textbf{(D)}\\; 3 \\qquad\\textbf{(E)}\\; 4</span> </p>&#10;<hr><p>Full credit goes to <a href=\"https://maa.org/\">MAA</a> for authoring these problems. These problems were taken on the <a href=\"https://artofproblemsolving.com/\">AOPS</a> website.</p>", "hints_md": "", "hints_html": "", "editorial_md": "", "editorial_html": "", "flag_hint": "", "point_value": 3, "problem_name": "2015 AMC 12B Problem 20", "can_next": true, "can_prev": true, "nxt": "/problem/15_amc12B_p21", "prev": "/problem/15_amc12B_p19"}}