Re: N = a^2 + b^2 + c^2 question

[email protected] Mon, 17 Nov 2025 10:16:59 +0100
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <[email protected]>
On 2025-11-17 02:32, American Citizen wrote:
> In trying to obtain a fast but exhaustive algorithm for finding 3
> squares which sum to a given number n, I found that using n = 416666,
> I obtained 339 unique representations of [a,b,c] such that a^2+b^2+c^2
> = n.
> 
> Can anyone verify that this count is correct for n?
> 
If you generate all permutations, then all sign combinations and finally 
remove duplicates, you can check whether you get the correct number 
r_3(416666):
https://en.wikipedia.org/wiki/Sum_of_squares_function#k_=_3

You need to get 16248 entries:

? 12*qfbclassno(-4*416666)
16248
?


Regards,

Hermann.