P229
projecteuler.net

Four Representations Using Squares

ℹ️Published on Saturday, 24th January 2009, 09:00 am; Solved by 1628;
Difficulty rating: 70%

Consider the number $3600$. It is very special, because

\begin{alignat}{2} 3600 &= 48^2 + &&36^2\\ 3600 &= 20^2 + 2 \times &&40^2\\ 3600 &= 30^2 + 3 \times &&30^2\\ 3600 &= 45^2 + 7 \times &&15^2 \end{alignat}

Similarly, we find that $88201 = 99^2 + 280^2 = 287^2 + 2 \times 54^2 = 283^2 + 3 \times 52^2 = 197^2 + 7 \times 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:

\begin{alignat}{2} 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, \end{alignat}

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 \times 10^9$?



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.