Problem

Source: Iran second round 2024 p2

Tags: algebra and number theory



Find all sequences $(a_n)_{n\geq 1}$ of positive integers such that for all integers $n\geq 3$ we have $$ \dfrac{1}{a_1 a_3} + \dfrac{1}{a_2a_4} + \cdots + \dfrac{1}{a_{n-2}a_n}= 1 - \dfrac{1}{a_1^2+a_2^2+\cdots +a_{n-1}^2}. $$