cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A285552 #21 Jun 15 2017 06:05:41
%S A285552 23,224,128,3712,896,512,1536,54272,14848,11264,3584,11776,2048,6144,
%T A285552 20480,833536,217088,94208,59392,45056,116736,22528,14336,118784,
%U A285552 47104,8192,63488,24576,49152,81920,294912,13082624,3334144,1564672,868352,548864,376832
%N 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.
%C A285552 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.
%C A285552 Larger terms tend to be divisible by larger powers of two:
%C A285552    n         a(n)
%C A285552   ==  ==================
%C A285552    1     23 = 2^0  *  23
%C A285552    2    224 = 2^5  *   7
%C A285552    3    128 = 2^7  *   1
%C A285552    4   3712 = 2^7  *  29
%C A285552    5    896 = 2^7  *   7
%C A285552    6    512 = 2^9  *   1
%C A285552    7   1536 = 2^9  *   3
%C A285552    8  54272 = 2^10 *  53
%C A285552    9  14848 = 2^9  *  29
%C A285552   10  11264 = 2^10 *  11
%C A285552   11   3584 = 2^9  *   7
%C A285552   12  11776 = 2^9  *  23
%C A285552   13   2048 = 2^11 *   1
%C A285552   14   6144 = 2^11 *   3
%C A285552   15  20480 = 2^12 *   5
%C A285552   16 833536 = 2^11 * 407
%C A285552   17 217088 = 2^12 *  53
%C A285552   18  94208 = 2^12 *  23
%C A285552   19  59392 = 2^11 *  29
%C A285552   20  45056 = 2^12 *  11
%C A285552   21 116736 = 2^11 *  57
%C A285552   22  22528 = 2^11 *  11
%C A285552   23  14336 = 2^11 *   7
%C A285552   24 118784 = 2^12 *  29
%C A285552   25  47104 = 2^11 *  23
%C A285552   26   8192 = 2^13 *   1
%C A285552   27  63488 = 2^11 *  31
%C A285552   28  24576 = 2^13 *   3
%C A285552   29  49152 = 2^14 *   3
%C A285552   30  81920 = 2^14 *   5
%C A285552   31 294912 = 2^15 *   9
%C A285552 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.,
%C A285552   a(1)      <    a(2)      >    a(3)
%C A285552   a(3)      <    a(4)   > ... > a(6)
%C A285552   a(6)   < ... < a(8)   > ... > a(11)
%C A285552   a(13)  < ... < a(16)  > ... > a(20)
%C A285552   a(28)  < ... < a(32)  > ... > a(40)
%C A285552   a(59)  < ... < a(64)  > ... > a(75)
%C A285552   a(122) < ... < a(128) > ... > a(143)
%C A285552   a(248) < ... < a(256) > ... > a(275)
%H A285552 Jon E. Schoenfield, <a href="/A285552/b285552.txt">Table of n, a(n) for n = 1..1000</a>
%e A285552 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.
%e A285552 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.
%Y A285552 Cf. A178786.
%K A285552 nonn
%O A285552 1,1
%A A285552 _Jon E. Schoenfield_, Jun 14 2017