Problem

Source: Cono Sur Olympiad 2016, problem 1

Tags: number theory, Perfect Squares, cono sur



Let $\overline{abcd}$ be one of the 9999 numbers $0001, 0002, 0003, \ldots, 9998, 9999$. Let $\overline{abcd}$ be an special number if $ab-cd$ and $ab+cd$ are perfect squares, $ab-cd$ divides $ab+cd$ and also $ab+cd$ divides $abcd$. For example 2016 is special. Find all the $\overline{abcd}$ special numbers. Note: If $\overline{abcd}=0206$, then $ab=02$ and $cd=06$.