P273
projecteuler.net

Sum of Squares

ℹ️Published on Saturday, 9th January 2010, 01:00 pm; Solved by 1556;
Difficulty rating: 70%

Consider equations of the form: $a^2 + b^2 = N$, $0 \le a \le b$, $a$, $b$ and $N$ integer.

For $N=65$ there are two solutions:

$a=1$, $b=8$ and $a=4$, $b=7$.

We call $S(N)$ the sum of the values of $a$ of all solutions of $a^2 + b^2 = N$, $0 \le a \le b$, $a$, $b$ and $N$ integer.

Thus $S(65) = 1 + 4 = 5$.

Find $\sum S(N)$, for all squarefree $N$ only divisible by primes of the form $4k+1$ with $4k+1 \lt 150$.



Soluzione

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