Prove that for any integers $ n \ge 2$ there is a set $ A_n$ of $ n$ distinct positive integers such that for any two distinct elements $ i,j \in A_n, |i-j|$ divides $ i^2+j^2.$
Source: Ukraine 2005 grade 11
Tags: induction, number theory unsolved, number theory
Prove that for any integers $ n \ge 2$ there is a set $ A_n$ of $ n$ distinct positive integers such that for any two distinct elements $ i,j \in A_n, |i-j|$ divides $ i^2+j^2.$