MathLabs

Problem 2

Find all integers n≥3n \ge 3 for which there exist real numbers a1,a2,…,ana_1, a_2, \ldots, a_n satisfying an+1=a1a_{n+1}=a_1, an+2=a2a_{n+2}=a_2, and aiai+1+1=ai+2a_ia_{i+1}+1=a_{i+2} for i=1,2,…,ni=1,2,\ldots,n.
Step 5 of 7: If 3∤n3\nmid n the sequence is constant
gcd⁡(n,3)=1 ⟹ a1=a2=⋯=an\gcd(n,3)=1\ \Longrightarrow\ a_1=a_2=\cdots=a_n
Detailed analysis

The relation ai=ai+3a_i=a_{i+3} for every ii means aia_i depends only on the residue of ii modulo gcd⁡(n,3)\gcd(n,3), because repeatedly shifting an index by 33 modulo nn cycles exactly through its residue class modulo gcd⁡(n,3)\gcd(n,3) before returning to itself. Since gcd⁡(n,3)∈{1,3}\gcd(n,3)\in\{1,3\}, the case 3∤n3\nmid n forces gcd⁡(n,3)=1\gcd(n,3)=1, so every index lies in one residue class and a1=a2=⋯=ana_1=a_2=\cdots=a_n.