◀ THE FOLD0ROOT.AI // WORLD II · SPAWN · HELLO WORLD◆ .dlw.fold
THE FOLD / SPAWN / HELLO WORLD / THE GAUSS EUREKA

THE GAUSS EUREKA

every number as three triangular numbers
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Gauss’s Eureka theorem: every non-negative integer is a sum of three triangular numbers. The triangular numbers are Tk = k(k + 1)/2 — 0, 1, 3, 6, 10, 15, … — and any n can be written Ta + Tb + Tc. Gauss proved it at nineteen and wrote in his diary “EUREKA! num = Δ + Δ + Δ.” It is equivalent to a case of the three-square theorem: n = Ta + Tb + Tc exactly when 8n + 3 is a sum of three odd squares, since 8Tk + 1 = (2k + 1)2.

LIT verified live: every integer from 0 to 3000 is found to be a sum of three triangular numbers, and each decomposition satisfies the 8n + 3 = (2a+1)2 + (2b+1)2 + (2c+1)2 equivalence (window.__gausseureka). FIG no framing; an exhaustive triangular search and the odd-square identity.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at hello-world — the first jubilant discovery, Gauss’s own “EUREKA”: every number, however large, is just three triangular numbers stacked. That first cry is the boot. AVAN (AI) built the instrument: the triangular-number search for three parts, and the 8n + 3 three-odd-squares equivalence.

Credit as content: Carl Friedrich Gauss (diary entry, 10 July 1796). The weave: David names hello-world; I search for three triangular numbers summing to each n, confirm every n in range decomposes, and check the classical bridge that this is the same as writing 8n + 3 as three odd squares — Gauss’s Eureka, made runnable.
3 ONE DIMENSION
Triangular numbers 0,1,3,6,10,15,21,… Every n = Ta+Tb+Tc: 5 = 1+1+3, 10 = 0+0+10, 17 = 1+6+10. Equivalent to 8n+3 being a sum of three odd squares.
4 TWO DIMENSIONS · INTERACTIVE
A number and three triangular numbers summing to it, drawn as stacked triangles; the 8n+3 identity and the range checked.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: every number as three triangles.
AVAN’s addition (the inverse-companion): don’t build numbers by adding ones — build them from three triangular numbers, always possible, mirrored by writing 8n + 3 as three odd squares. The inverse of ‘count up by units’ is ‘every number is three triangles.’ Magenta is the ordinary unit count; green is the three-triangular-number decomposition. Eureka: num = Δ + Δ + Δ.
LIT Genuine Gauss Eureka theorem (Carl Friedrich Gauss, diary entry 10 July 1796). Verified live: every integer from 0 to 3000 is found to be a sum of three triangular numbers by exhaustive search (window.__gausseureka.allRepresentable), and each decomposition satisfies the classical equivalence 8n+3 = (2a+1)²+(2b+1)²+(2c+1)² (window.__gausseureka.equivalence).

FIG No framing: the triangular-number search for three parts and the 8n+3 three-odd-squares equivalence both run in-browser with exact arithmetic. The AVAN inverse is honest — building every number from three triangular numbers (mirrored by writing 8n+3 as three odd squares) rather than counting up by units is a genuine representation, tied exactly to the three-square theorem; magenta is the unit count, green the three-triangular-number decomposition. Eureka: num = Δ + Δ + Δ.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of HELLO WORLD · David Lee Wise (ROOT0), with AVAN