## Four Representations using Squares

### Problem 229

Published on Saturday, 24th January 2009, 09:00 am; Solved by 972; Difficulty rating: 70%Consider the number 3600. It is very special, because

3600 = 48

3600 = 20

3600 = 30

3600 = 45

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

^{2}+ 2×40^{2}3600 = 30

^{2}+ 3×30^{2}3600 = 45

^{2}+ 7×15^{2}Similarly, we find that 88201 = 99^{2} + 280^{2} = 287^{2} + 2×54^{2} = 283^{2} + 3×52^{2} = 197^{2} + 7×84^{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:

`n`=

`a`

_{1}^{2}+

`b`

_{1}^{2}

`n`=

`a`

_{2}^{2}+ 2

`b`

_{2}^{2}

`n`=

`a`

_{3}^{2}+ 3

`b`

_{3}^{2}

`n`=

`a`

_{7}^{2}+ 7

`b`

_{7}^{2},

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 2×10^{9}?