Problem 229

Four Representations using Squares

Consider the number 3600. It is very special, because

3600 = 48^{2} + 36^{2}

3600 = 20^{2} + 240^{2}

3600 = 30^{2} + 330^{2}

3600 = 45^{2} + 715^{2}

3600 = 20

3600 = 30

3600 = 45

Similarly, we find that 88201 = 99^{2} + 280^{2} = 287^{2} + 254^{2} = 283^{2} + 352^{2} = 197^{2} + 784^{2}.

In 1747, Euler proved which numbers are representable as a sum of two squares.
We are interested in the numbers `n` which admit representations of all of the following four types:

where the `a`_{k} and `b`_{k} are positive integers.

There are 75373 such numbers that do not exceed 10^{7}.

How many such numbers are there that do not exceed 210^{9}?

**
These problems are part of
Project Euler
and are licensed under
CC BY-NC-SA 2.0 UK
**