[seqfan] Sum of three squares

Charles Greathouse charles.greathouse at case.edu
Wed Mar 26 04:06:53 CET 2014


It's well-known that numbers are the sum of three integer squares if and
only if they are not of the form 4^n(8m+7). In particular, this means that
1/8 + 1/8 * 1/4 + 1/8 * 1/4^2 + ... = 1/6 of numbers up to x are not of
this form, with a logarithmic error term: A000378(n) = 6n/5 + O(log n).
(Strangely, this was not yet in the OEIS so I added it.)

The situation for *positive* squares is much less clear. The best I can
think of doing is to subtract off the numbers which are the sum of two
squares. These numbers have density ~ kn/sqrt(log n), leading to A000408(n)
= 6n/5 + O(n/sqrt(log n)).

But this ignores the overlap between the sequences, which might lead to a
better error term, and doesn't allow for a second asymptotic term with a
yet smaller error term. Can anyone outdo my crude estimate here? In other
words, can anyone find a nice asymptotic for A000549?

Charles Greathouse
Analyst/Programmer
Case Western Reserve University



More information about the SeqFan mailing list