Problem:
For every positive integer n, let mod5β(n) be the remainder obtained when n is divided by 5 . Define a function f:{0,1,2,3,β¦}Γ{0,1,2,3,4}β{0,1,2,3,4} recursively as follows:
f(i,j)=β©βͺβͺβ¨βͺβͺβ§βmod5β(j+1) if i=0 and 0β€jβ€4f(iβ1,1) if iβ₯1 and j=0, and f(iβ1,f(i,jβ1)) if iβ₯1 and 1β€jβ€4β
What is f(2015,2) ?
Answer Choices:
A. 0
B. 1
C. 2
D. 3
E. 4
Solution:
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).
i/j012345β0123031β1230311β2342431β3404111β4011031ββ
If follows that f(i,2)=1β for all iβ₯5.
The problems on this page are the property of the MAA's American Mathematics Competitions