# Sum of 5 distinct squares

Richard Guy rkg at cpsc.ucalgary.ca
Tue Jul 18 21:42:43 CEST 2006

MR1301824 (95j:11092)
Bateman, Paul T.(1-IL); Hildebrand, Adolf J.(1-IL); Purdy, George
B.(1-CINC-C)
Sums of distinct squares.
Acta Arith. 67 (1994), no. 4, 349--380.
11P05 (11P55)
Service 	Journal 	Original Article
References: 0 	Reference Citations: 1 	Review Citations: 0
For $s\inN$, $s\geq 5$, let $N(s)$ denote the largest integer not
expressible as a sum of $s$ distinct non-zero squares. According to an old
result of E. M. Wright \ref[Quart. J. Math. Oxford Ser. 4 (1933), 37--51;
Zbl 6, 250], $N(s)$ exists for $s\geq 5$. Let
$$P(s)\coloneq\sum^s_{n=1}n^2=s(s+1)(2s+1)/6.$$ Trivially, as $P(s)+1$ is
not expressible in the desired way, $N(s)>P(s)$. However, $P(s)$ gives the
correct order of magnitude of $N(s)$. The main result of the paper is the
following: Let $R(s)\coloneq N(s)-P(s)$,
$$\lambda_s\coloneq\sqrt2\max{}^{1/2}(\|\sqrt{2s}\|,\|\sqrt{2s}-\tfrac12\|)=(\tfrac12+\|\sqrt{8s}-\tfrac12\|)^{1/2}$$
(so $\lambda_s$ oscillates in the interval $[2^{-1/2},1]$, depending on
the relative position of $8s$ with respect to the sequence of squares),
$L_x\coloneq \log\log\max(x,e^e)$, $t_x\coloneq [L_x/\log 2]$,
$f(x)\coloneq\sum^{t_x}_{k=0}x^{2^{-k}}$. Then (i)
$R(s)=2s(\sqrt{2s}+\lambda_s(2s)^{1/4}+O(s^{1/8}))$; (ii) $R(s)\leq 2s(f(\sqrt{2s})+O(L^2_s))$; (iii) for the sequence $s_1=1$,
$s_k=2s^2_{k-1}+s_{k-1}$ $(k\geq 2)$, $R(s_k)\geq 2s_k(f\sqrt{2s_k})+O(L_{s_k}))$ so that, in a sense, (ii) is best
possible. These results are supplemented by the explicit upper bounds
$N(s)<(s-1)^5$ $(s\geq 5)$, $N(s)<P(s)+2s\sqrt{2s}+44s^{5/4}+108s$\break
$(s\geq 166)$, the last of which allows one to prove that $N(s)$ is
monotonic for $s\geq 7$, answering a question of Erdös. The authors also
prove that $N^*(s)=N(s)$ for every $s\geq 5$, where in the definition of
$N^*(s)$ one also requires the summands to have greatest common divisor 1.

Finally, they give some numerical data for $N(s)$ and $R(s)$.

On Tue, 18 Jul 2006, franktaw at netscape.net wrote:

> A004438 is the numbers that are not the sum of 5
> distinct squares.  I think this sequence is finite.
> It contains 76 values:
>
> 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2
> 8,29,31,32,33,34,35,36,37,38,40,41,42,43,44,45,47,48,49,52,53,56,58,59,60
> ,61,64,67,68,69,72,73,76,77,80,83,89,92,96,97,101,104,108,112,124,128,136
> ,188,224
>
> and nothing else up to 5000.
>
> If we look at non-sums of 5 distinct non-zero squares,
> there are 124 values:
>
> 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2
> 8,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52
> ,53,54,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,76,77,78,80,
> 81,83,84,85,86,89,91,92,93,96,97,98,101,102,104,105,107,108,109,112,113,1
> 16,117,119,122,124,125,128,133,136,137,140,141,149,153,161,164,173,177,18
> 2,188,189,197,203,221,224,236,245
>
> and again nothing else up to 5000.  (This sequence is
> not in the OEIS.)
>
> I am confident, based on these results, that these
> sequences are in fact finite, and that the above lists
> are complete.  This isn't a proof, however.  Does
> anyone have any idea how to prove this?
>