Two families of odd primes
Divide an odd prime by 4. A remainder of 1 gives eight points on the circle. A remainder of 3 leaves the circle empty.
A prime can vanish on a circle. Give it four coordinates and it always lights up. Try the same number in each dimension.
Every dot starts at a point with whole-number coordinates, which may be negative or zero. Square those coordinates and add them to get n. That puts every point exactly √n from the origin.
Divide an odd prime by 4. A remainder of 1 gives eight points on the circle. A remainder of 3 leaves the circle empty.
There are more ways to land on the sphere, but 7 still has none. Try 28, which is 7 multiplied by 4. Its sphere stays empty too.
Four squares can make any positive whole number. An odd prime p lights up exactly 8(p + 1) points on the 3-sphere.
An odd prime p is the sum of two integer squares exactly when p ≡ 1 (mod 4). In that case r₂(p) = 8. Otherwise r₂(p) = 0. The even prime has r₂(2) = 4. Here r counts ordered, signed tuples.
Zagier · proof of Fermat’s theorem Hirschhorn · Jacobi’s two-square count
A positive integer n is a sum of three integer squares exactly when n is outside the family 4ᵃ(8b + 7), for integers a, b ≥ 0. For primes the excluded family is p ≡ 7 (mod 8).
r₄(n) = 8σ(n) for odd n; r₄(p) = 8(p + 1) for odd primes p
Lagrange gives existence for every positive n. Jacobi counts all signed, ordered representations by summing eight times each divisor of n that is not a multiple of four. For odd n this uses every divisor, giving the divisor sum σ(n). At the even prime, r₄(2) = 24.
The plotted integer tuples give quaternions a + bi + cj + dk of norm a² + b² + c² + d². The Hurwitz order also permits coordinates all in ℤ + ½. Its 24 units consist of 8 signed coordinate axes and 16 independent sign choices of (½, ½, ½, ½). A primitive Hurwitz quaternion, one with no integer divisor greater than one in the order, factors uniquely for a fixed order of prime norms up to inserting adjacent u, u⁻¹ pairs between factors.
As odd primes p tend to infinity, the normalized lattice points converge in distribution to uniform surface measure on the unit 3-sphere. Every point of prime norm is primitive. The direction marginal of Aka, Einsiedler and Shapira’s Theorem 1.2 applies by fixing any odd auxiliary prime and discarding that single prime from the sequence.
Area fraction at angular radius θ = (θ − sin(θ) cos(θ)) / π
| Prime p | integer points | Max. gap (pp) |
|---|
Divide each coordinate by √n, then rotate in the plane spanned by x and w. Project the resulting unit 3-sphere from its north pole into ordinary 3D space. A perspective camera shows this chart. Points near the pole recede beyond the drawing window and still contribute to the exact count.
(x, y, z, w) ↦ (x, y, z) / (1 − w)
Independent verification program (available on request) Implementation notes