files / problems / two-squares-gap / RESEARCH.md

6.7 KB · on GitHub

Research log — a smaller constant in the two-squares gap

Status (accessed 2026-08-17)

Do not claim the Landau–Ramanujan density.

Published explicit upper bounds on G(n)G(n)

Write G(n)=min⁡{s−n:s≥n, s=a2+b2}G(n)=\min\{s-n:s\ge n,\ s=a^2+b^2\} (non-negative squares, 00 allowed). Consecutive differences of two-squares are the same sequence, so Green’s backward interval is the same constant.

bound range source
G(n)<αn1/4G(n)<\alpha n^{1/4} for every α>22\alpha>2\sqrt{2} all large nn Bambah–Chowla 1947
G(n)<22 n1/4+1G(n)<2\sqrt{2}\,n^{1/4}+1 all n≥1n\ge 1 arithmetic form, Shiu 2013/2019
G(n)<22 n1/4−1G(n)<2\sqrt{2}\,n^{1/4}-1 all large nn Uchiyama 1964
G(n)<22 n1/4−2G(n)<2\sqrt{2}\,n^{1/4}-2 all n≥1n\ge 1 Jameson, Math. Gaz. 103 (2019)
G(n)<22 n1/4−3G(n)<2\sqrt{2}\,n^{1/4}-3 open Shiu, Integers 19 (2019)
any α<22\alpha<2\sqrt{2} open Shiu: “insurmountable” for 70+ years
C=1/10C=1/10 for all large XX open Green #66 / Littlewood

Log-scale lower bounds (Richards 1/41/4; Dietmann–Elsholtz–Kalmynin– Konyagin–Maynard 0.868⋯0.868\cdots) do not move the X1/4X^{1/4} coefficient.

What we certified

Theorem. G(n)<22 n1/4−3G(n)<2\sqrt{2}\,n^{1/4}-3 for every integer nn with 2≤n≤1.024⋅10152\le n\le 1.024\cdot 10^{15}, except n∈{3,6,21,91}n\in\{3,6,21,91\}.

This is a computer-assisted improvement of the published additive constant −2-2 (Jameson) to −3-3 (Shiu’s next open increment), on an explicit range. It is not a proof for all large nn, and it is not Green’s 1/101/10.

Independently verified stored witnesses: every danger-zone top with m≤250m\le 250 in compute/a3_cert_m250.json. The m≤2000m\le 2000 dump (~1e6 witnesses) is regenerable with certify_a3.py --m-max 2000 and is not in the tree. The same searcher reports zero unsaved tops for m≤8000m\le 8000, which is the 1.024⋅10151.024\cdot 10^{15} range.

Classification (integer)

Let u=⌊n⌋u=\lfloor\sqrt n\rfloor, rem=n−u2\mathrm{rem}=n-u^2, write rem=m2+ℓ\mathrm{rem}=m^2+\ell with 0≤ℓ≤2m0\le\ell\le 2m. The Bambah–Chowla point is (u,v)(u,v) with v=⌈rem⌉v=\lceil\sqrt{\mathrm{rem}}\rceil. Set h=u2+v2−nh=u^2+v^2-n and h2=(u+1)2−nh_2=(u+1)^2-n. Then G(n)≤min⁡(h,h2)G(n)\le\min(h,h_2), and two-point a=3a=3 fails if and only if (min⁡(h,h2)+3)4≥64n(\min(h,h_2)+3)^4\ge 64n (equivalently min⁡(h,h2)≥Φ−3\min(h,h_2)\ge\Phi-3 with Φ=22 n1/4\Phi=2\sqrt{2}\,n^{1/4}).

Shiu’s ladder lemma: after the two zeros at the start of IuI_u, the values of hh form descending unit steps of length 2m2m. The top of the mm-th ladder is n0=u2+m2+1n_0=u^2+m^2+1 (ℓ=1\ell=1), with h=2mh=2m and h2=k:=2u−m2h_2=k:=2u-m^2. Rung t≥1t\ge 1 has n=n0+tn=n_0+t, leftovers 2m−t2m-t and k−tk-t.

Integer bounds, for n≥2n\ge 2:

  1. If ℓ=0\ell=0, then nn itself is a two-square and G(n)=0G(n)=0. For n≥2n\ge 2 one has Φ−3>0\Phi-3>0, so a=3a=3 holds.
  2. If k≤2m−3k\le 2m-3, then min⁡≤2m−3\min\le 2m-3 and (min⁡+3)4≤(2m)4=16m4<64n(\min+3)^4\le(2m)^4=16m^4<64n, so two-point a=3a=3 holds.
  3. If k≥3m+3k\ge 3m+3, then min⁡=2m\min=2m and 64n≥16(m2+3m+3)2+64m2+64>(2m+3)464n\ge 16(m^2+3m+3)^2+64m^2+64>(2m+3)^4, so two-point a=3a=3 holds.
  4. If t≥1t\ge 1 and k∈[2m−2,3m+2]k\in[2m-2,3m+2], write μ=min⁡(2m,k)\mu=\min(2m,k). Direct expansion gives (μ+2)4<64(n0+1)(\mu+2)^4<64(n_0+1) in each of the three subcases k=2m−2k=2m-2, k=2m−1k=2m-1, k≥2mk\ge 2m. So no rung t≥1t\ge 1 is a two-point a=3a=3 failure.

Thus every two-point a=3a=3 failure with n≥2n\ge 2 is a ladder top n=u2+m2+1n=u^2+m^2+1 with 2u=m2+k2u=m^2+k and 2m−2≤k≤3m+22m-2\le k\le 3m+2. On that set, a=3a=3 is exactly the existence of some lattice point with leftover in {0,1,…,W}\{0,1,\dots,W\}, W=max⁡{w:(w+3)4<64n}W=\max\{w:(w+3)^4<64n\}.

Also m≤⌊2u⌋≤⌊2 n1/4⌋m\le\lfloor\sqrt{2u}\rfloor\le\lfloor\sqrt{2}\,n^{1/4}\rfloor. So m≤8000m\le 8000 covers every integer n≤(8000/2)4=1.024⋅1015n\le(8000/\sqrt{2})^4=1.024\cdot 10^{15}.

The four exceptions

nn previous next G(n)G(n) (G+3)4(G+3)^4 64n64n (G+2)4(G+2)^4
3 2 4 1 256 192 81
6 5 8 2 625 384 256
21 20 25 4 2401 1344 1296
91 90 97 6 6561 5824 4096

Each row has (G+3)4≥64n>(G+2)4(G+3)^4\ge 64n>(G+2)^4.

Green’s 1/101/10

Not proved, and not disproved for all sufficiently large XX.

A gap census through N=2⋅107N=2\cdot 10^7 (generate every two-square, no density claim):

Richards-type gaps of size ≍log⁡X\asymp\log X live at X=exp⁡(Θ(k))X=\exp(\Theta(k)) and are far below X1/4X^{1/4} at that scale; they do not produce infinite-family counterexamples to 1/101/10. Isolated gap tables are not a bound. We do not claim that the running-max ratio tends to 00.

Replay

See compute/README.md. The integer test (G+3)4<64n(G+3)^4<64n never uses floating Φ\Phi in the certificate checker.

Sources fetched