1842675848 has four representations as the sum of two squares: 1842675848 = 3518^2 + 42782^2 = 5458^2 + 42578^2 = 11338^2 + 41402^2 = 19702^2 + 38138^2.
It got me to wonder which numbers in this range (say, less than 5 billion) have four or more representations as the sum of two squares? And which of these has the most?
Is there any systematic way to answer this question?



Friday: I extended the table Gerry pointed out, up to $10^{15}$; athough I dropped the initial $2, 50$ as multiplying by $2$ does not change the number of representations ( I use $5$ and $65$). I give the number of representations (as sum of two squares, numbers that are to be squared taken as positive and then ordered), the factorization of the number, and its log base ten.
http://oeis.org/A007511
as text file: http://oeis.org/A007511/b007511.txt
The best you can do is $$ N = 5^{a_5} 13^{a_{13}} 17^{a_{17}}... p_r^{a_{p_r}} $$ with $$ a_5 \geq a_{13} \geq \cdots \geq a_{p_r} \geq 0 $$ and each prime $$ p_j \equiv 1 \pmod 4. $$
From the example below, it is clear we can take $p_r \leq 53.$
So, for example, you can do fairly well with all exponents $1$ and the product as large as possible below your bound, but you can do a little better.
To start, try $$ 5 \cdot 13 \cdot 17 \cdot 29 \cdot 37 \cdot 41 \cdot 53 = 2576450045 $$ Better, $$ 5^2 \cdot 13^2 \cdot 17 \cdot 29 \cdot 37 \cdot 41 = 3159797225 $$