SAT Math Practice Question #23705 - SATify | SATify
#23705
recursion
functions
modular arithmetic
Recurrence Relations
hard
120 sec
For every positive integer n, let mod7(n) be the remainder obtained when n is divided by 7. Define a function g:0,1,2,3,…×0,1,2,3,4,5,6→0,1,2,3,4,5,6 recursively as follows: g(i,j)=⎩⎨⎧mod7(j+2)g(i−1,2)g(i−1,g(i,j−1))if i=0 and 0≤j≤6,if i≥1 and j=0,if i≥1 and 1≤j≤6.
What is g(2023,5)?