Problem

Source: 2024 Korea Summer Program Practice Test Junior P2

Tags: number theory



Find all integer sequences $a_1 , a_2 , \ldots , a_{2024}$ such that $1\le a_i \le 2024$ for $1\le i\le 2024$ and $$i+j|ia_i-ja_j$$for each pair $1\le i,j \le 2024$.