

A285552


Smallest number k that cannot be expressed as x^2 + y^2 + z^2 + w^2 where x >= y >= z >= w >= 0 and x > floor(sqrt(k))  n, but can be so expressed if x = floor(sqrt(k))  n.


1



23, 224, 128, 3712, 896, 512, 1536, 54272, 14848, 11264, 3584, 11776, 2048, 6144, 20480, 833536, 217088, 94208, 59392, 45056, 116736, 22528, 14336, 118784, 47104, 8192, 63488, 24576, 49152, 81920, 294912, 13082624, 3334144, 1564672, 868352, 548864, 376832
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Lagrange's theorem tells us that each positive integer k can be written as a sum of four squares. Some can be written as such a sum using a "greedy" algorithm in which x = floor(sqrt(k)), y = floor(sqrt(k  x^2)), z = floor(sqrt(k  x^2  y^2)), and w = sqrt(k  x^2  y^2  z^2); e.g., 165 = 12^2 + 4^2 + 2^2 + 1^2, and x = floor(sqrt(165)) = floor(12.845...) = 12. For some other positive integers k, there is no sum x^2 + y^2 + z^2 + w^2 = k in which x = floor(sqrt(k)), no matter what values of y, z, and w are tested. For certain positive integers k, the largest x such that x^2 + y^2 + z^2 + w^2 = k is considerably less than floor(sqrt(k)). a(n) is the smallest number k such that there is no such sum in which floor(sqrt(k))  x < n, but there is at least one such sum in which floor(sqrt(k))  x = n.
Larger terms tend to be divisible by larger powers of two:
n a(n)
== ==================
1 23 = 2^0 * 23
2 224 = 2^5 * 7
3 128 = 2^7 * 1
4 3712 = 2^7 * 29
5 896 = 2^7 * 7
6 512 = 2^9 * 1
7 1536 = 2^9 * 3
8 54272 = 2^10 * 53
9 14848 = 2^9 * 29
10 11264 = 2^10 * 11
11 3584 = 2^9 * 7
12 11776 = 2^9 * 23
13 2048 = 2^11 * 1
14 6144 = 2^11 * 3
15 20480 = 2^12 * 5
16 833536 = 2^11 * 407
17 217088 = 2^12 * 53
18 94208 = 2^12 * 23
19 59392 = 2^11 * 29
20 45056 = 2^12 * 11
21 116736 = 2^11 * 57
22 22528 = 2^11 * 11
23 14336 = 2^11 * 7
24 118784 = 2^12 * 29
25 47104 = 2^11 * 23
26 8192 = 2^13 * 1
27 63488 = 2^11 * 31
28 24576 = 2^13 * 3
29 49152 = 2^14 * 3
30 81920 = 2^14 * 5
31 294912 = 2^15 * 9
In some regions, a plot of the sequence looks fairly chaotic, but at each value of n = 2^k, a(n) reaches a local maximum, and the lengths of the monotonic runs on either side increases as k increases; e.g.,
a(1) < a(2) > a(3)
a(3) < a(4) > ... > a(6)
a(6) < ... < a(8) > ... > a(11)
a(13) < ... < a(16) > ... > a(20)
a(28) < ... < a(32) > ... > a(40)
a(59) < ... < a(64) > ... > a(75)
a(122) < ... < a(128) > ... > a(143)
a(248) < ... < a(256) > ... > a(275)


LINKS



EXAMPLE

At k = 128, floor(sqrt(k)) = 11, and there is no sum x^2 + y^2 + z^2 + w^2 = k in which x = 11, 10, or 9, but there is such a sum in which x = 8 (namely, 8^2 + 8^2 + 0^2 + 0^2 = 128); no smaller positive integer k has this property, so a(3) = 128.
At k = 13082624, floor(sqrt(k)) = 3616, and there is no sum x^2 + y^2 + z^2 + w^2 = k such that x > 3584 = 3616  32, but there is such a sum in which x = 3584 (namely, 3584^2 + 448^2 + 192^2 + 0^2 = 13082624); no smaller positive integer k has this property, so a(32) = 13082624.


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



