MathDB
f(n,m)=a_1-a_2+a_3 -a_4+ ...+a _{2001} & a_{k+1} is residue of a_k^2 mod n

Source: Mexican Mathematical Olympiad 2001 OMM P4

July 30, 2018
number theoryNumber theoretic functionsresidue

Problem Statement

For positive integers n,mn, m define f(n,m)f(n,m) as follows. Write a list of 2001 2001 numbers aia_i, where a1=ma_1 = m, and ak+1a_{k+1} is the residue of ak2a_k^2 modnmod \, n (for k=1,2,...,2000k = 1, 2,..., 2000). Then put f(n,m)=a1a2+a3a4+a5...+a2001f(n,m) = a_1-a_2 + a_3 -a_4 + a_5- ... + a_{2001}. For which n5n \ge 5 can we find m such that 2mn/22 \le m \le n/2 and f(m,n)>0f(m,n) > 0?