Executive summary
three-square-balance asks how close the largest and smallest parts can be when an eligible integer is written as three nonnegative squares. It records the inputs where this minimum spread reaches a new high. The record-location sequence is published as OEIS A395008. The repository contains an optimized resumable search, an independently ordered validator, Python and PARI/GP references, exact data below one billion, and a browser visualization. The scaling law is proved; the finite-range completeness is exhaustively checked; the claimed pattern beyond that range is kept explicitly conjectural.
Problem and context
Not every integer is representable by three squares. For eligible values, the project minimizes x - z over ordered triples x ≥ y ≥ z ≥ 0. Zero spread occurs at three equal squares; larger values describe inputs forced farther away from that balanced shape.
Multiplication by four doubles every part, giving an exact scaling relation for the minimum spread. That makes scaled seed chains central to the observed record structure.
What was built
- A fast OpenMP C engine with resumable long scans.
- An independent ascending-search validator that does not reuse the production
- Small Python and PARI/GP definitions for reference and sequence generation.
- The 65 record locations and canonical triples below
10^9. - An interactive view of shape directions and record locations.
search order.
Evidence and validation
The repository retains exactly 65 record locations below one billion. Its final record in that range is 973,078,528 with a spread of 28,672. The primary and independent C paths use different enumeration orders, giving a stronger cross-check than running the same implementation twice. PARI/GP and Python paths provide additional small-scale reference behavior.
The record list in the verified range is reproduced by scaled terms from six primitive seeds, with one seed contributing only its initial term before another chain overtakes it.
The repository now also includes a LODA implementation (loda/A395008.asm) and a check against the retained b-file. It implements the observed recurrence; this additional implementation does not prove completeness beyond the scan bound.
Boundaries
The six-seed closure is exhaustive only below 10^9. Treating it as complete for all larger values is conjectural. The archived companion object records spread values rather than record locations and is not part of the published sequence focus.
Repository map and first run
cd src
make
make check
gp -q records.gp
Use sequences/spread-record-locations/ for the OEIS definition and b-file, data/ for retained records and triples, and viz/README.md for the visual mapping.