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 1 of 7: The answer and the extremal construction
3∣n,a3j+1=a3j+2=−1, a3j+3=23\mid n,\qquad a_{3j+1}=a_{3j+2}=-1,\ a_{3j+3}=2
Detailed analysis

The claim is that such real numbers exist exactly when 3∣n3\mid n. For n=3kn=3k, repeating the block (−1,−1,2)(-1,-1,2) a total of kk times — i.e. a3j+1=a3j+2=−1a_{3j+1}=a_{3j+2}=-1 and a3j+3=2a_{3j+3}=2 for j=0,1,…,k−1j=0,1,\ldots,k-1 — gives a valid sequence: every three cyclically consecutive entries are a rotation of (−1,−1,2)(-1,-1,2), and (−1)(−1)+1=2(-1)(-1)+1=2, (−1)(2)+1=−1(-1)(2)+1=-1, (2)(−1)+1=−1(2)(-1)+1=-1 show that aiai+1+1=ai+2a_ia_{i+1}+1=a_{i+2} holds for every i=1,…,ni=1,\ldots,n. It remains to show that no other n≥3n\ge 3 works.