AMC12 2015 B
AMC12 2015 B · Q20
AMC12 2015 B · Q20. It mainly tests Patterns & sequences (misc), Remainders & modular arithmetic.
For every positive integer $n$, let $\bmod_{5}(n)$ be the remainder obtained when $n$ is divided by 5. Define a function $f:\{0,1,2,3,\dots\}\times\{0,1,2,3,4\}\to\{0,1,2,3,4\}$ recursively as follows:
$$f(i,j)=\begin{cases}\bmod_{5}(j+1) & \text{if $i=0$ and $0\leq j\leq4$,}\\f(i-1,1) & \text{if $i\geq1$ and $j=0$,}\\f(i-1,f(i,j-1)) & \text{if $i\geq1$ and $1\leq j\leq4$.}\end{cases}$$
What is $f(2015,2)$?
对于每个正整数 $n$,令 $\bmod_{5}(n)$ 为 $n$ 除以5的余数。递归定义函数 $f:\{0,1,2,3,\dots\}\times\{0,1,2,3,4\}\to\{0,1,2,3,4\}$ 如下:
$$f(i,j)=\begin{cases}\bmod_{5}(j+1) & \text{if $i=0$ and $0\leq j\leq4$,}\\f(i-1,1) & \text{if $i\geq1$ and $j=0$,}\\f(i-1,f(i,j-1)) & \text{if $i\geq1$ and $1\leq j\leq4$.}\end{cases}$$
$f(2015,2)$ 是多少?
(A)
0
0
(B)
1
1
(C)
2
2
(D)
3
3
(E)
4
4
Answer
Correct choice: (B)
正确答案:(B)
Solution
Answer (B): Computing from the definition leads to the following values of $f(i,j)$ for $i=0,1,2,3,4,5,6$ (the horizontal coordinate in the table) and $j=0,1,2,3,4$ (the vertical coordinate).
\[
\begin{array}{c|ccccccc}
4 & 0 & 1 & 1 & 0 & 3 & 1 & 1\\
3 & 4 & 0 & 4 & 1 & 1 & 1 & 1\\
2 & 3 & 4 & 2 & 4 & 3 & 1 & 1\\
1 & 2 & 3 & 0 & 3 & 1 & 1 & 1\\
0 & 1 & 2 & 3 & 0 & 3 & 1 & 1\\ \hline
& 0 & 1 & 2 & 3 & 4 & 5 & 6
\end{array}
\]
It follows that $f(i,2)=1$ for all $i\ge 5$.
答案(B):根据定义进行计算,可得到当 $i=0,1,2,3,4,5,6$(表中的水平坐标)且 $j=0,1,2,3,4$(垂直坐标)时,$f(i,j)$ 的如下取值。
\[
\begin{array}{c|ccccccc}
4 & 0 & 1 & 1 & 0 & 3 & 1 & 1\\
3 & 4 & 0 & 4 & 1 & 1 & 1 & 1\\
2 & 3 & 4 & 2 & 4 & 3 & 1 & 1\\
1 & 2 & 3 & 0 & 3 & 1 & 1 & 1\\
0 & 1 & 2 & 3 & 0 & 3 & 1 & 1\\ \hline
& 0 & 1 & 2 & 3 & 4 & 5 & 6
\end{array}
\]
因此,对所有 $i\ge 5$ 都有 $f(i,2)=1$。
Topics
Related Questions
Practice full AMC exams on amcdrill.
Try full-length practice and diagnostics at www.amcdrill.com.