three-square-balance

Spread-Record Locations

a(n) is the n-th number k at which the three-square minimal spread

s3(k) = min over k = x^2 + y^2 + z^2, x >= y >= z >= 0, of (x - z)

reaches a new record value over all smaller positive arguments.

s3(k) is defined for nonnegative k that are sums of three squares (equivalently, k is not of the form 4^a(8b+7), by Legendre). It is the spread of the most balanced three-square representation of k; s3(k) = 0 iff k = 3*m^2. The record sequence itself uses positive arguments k.

Terms

1, 4, 10, 16, 37, 58, 64, 130, 148, 232, 256, 445, 520, 592, 928, 1024, 1780, 2080, 2368, 3712, 4096, 7120, 8320, 9472, 14848, 16384, 28480, 33280, 37888, 59392, 65536, 113920, 133120, 151552, 237568, 262144, 455680, 532480, 606208, 950272, 1048576, 1822720, 2129920, 2424832, 3801088, 4194304, 7290880, 8519680, 9699328, 15204352, 16777216, 29163520, 34078720, 38797312, 60817408, 67108864, 116654080, 136314880, 155189248, 243269632, 268435456, 466616320, 545259520, 620756992, 973078528

These 65 terms are complete for k < 10^9 by the retained exact scan in ../../data/records_to_1e9_COMPLETE.txt. The last verified record below 10^9 is 973078528, with s3 = 28672.

b-file

b-file.txt has the 65 verified terms, offset 1.

Program

program.gp is a direct PARI/GP scanner: lista(N) prints each k <= N where s3(k) exceeds all previous values. For a reproducibility self-test and the constructive six-seed chain construction, see ../../src/records.gp.

../../loda/A395008.asm is a LODA program for the same terms: it stores a(1)..a(12) and applies the observed recurrence a(n) = 4*a(n-5) for n >= 13, the six-seed chain structure below in recurrence form. See ../../loda/README.md.

Observed Structure

The verified terms below 10^9 are reproduced by the six primitive record locations

1, 10, 37, 58, 130, 445

and their scaling orbits. Reason: s3(4k) = 2*s3(k), since every representation of 4k has all three parts even. Thus each primitive seed s has the forced orbit s, 4s, 16s, … . The verified record sequence below 10^9 is the increasing merge of the surviving terms from these orbits, with seed 10 contributing only its first term (40, 160, … are overtaken by the 37-chain) and the other five seeds contributing their complete 4^j chains.

The scaling identity explains the chain shape. The completeness of the six-seed set (that no seventh primitive seed exists) is empirical beyond the retained scan, verified exhaustively for k < 10^9. The b-file here contains only verified terms below 10^9.

Relation To 3*m^2

s3(k) = 0 exactly on k = 3*m^2 (three equal parts), so those k are the non-records at the floor of the statistic. The record locations are, in the opposite sense, the k most resistant to a balanced three-square representation.