What single number sets how tightly an ionic crystal like rock salt holds together — the Madelung constant — and can it be recovered by directly summing the Coulomb potential over the lattice WITHOUT writing the constant in, given that the sum is only conditionally convergent and so easy to compute wrong?
Units: dimensionless (Madelung constant of NaCl / rock salt, nearest-neighbour distance = length unit)
▶ Run this simulationRead how it works
The Madelung constant M = 1.747565 of rock salt (NaCl) recovered NON-CIRCULARLY from the raw ±1/r lattice sum — no closed form for M ever written in — to rel |Δ| = 2.2×10⁻⁸ at cube half-side n = 32, with the CONDITIONAL convergence of the sum demonstrated as a hazard, not assumed away. An ionic crystal's cohesive energy is U = −M·e²/(4πε₀·r₀); M = −Σ_{j≠0} (±1)/r_j is a pure number fixed by geometry. Because Σ ±1/r is only conditionally convergent (Riemann), the order matters: summed over expanding NEUTRAL CUBES (Evjen 1932 — face ions weighted ½, edge ¼, corner ⅛, so every shell is charge-neutral) the partial sums lock onto 1.747565, and doubling the cube half-side cuts the truncation error by 16× (n: 10→20 and 16→32), proving the residual is truncation and the limit is exactly M. The SAME machinery in reduced dimension returns 1.386294 = 2 ln 2 (1-D alternating chain) and 1.615543 (2-D square lattice) — geometry alone selects the constant. Decisive control: the naive expanding-SPHERE sum (full un-neutralised charges) does NOT converge — its partial sums swing with amplitude 7.4 over R = 16…48 and end 3.6 away from M — the same ±1/r terms in a different order with a different fate; and reordering the 1-D series two-positives-per-negative shifts it from 2 ln 2 to 3 ln 2 (gap = ln 2 = 0.693), the Riemann mechanism laid bare. π-of-crystals: a lattice geometry, counted, yields the number that binds the solid.
An ionic crystal is a lattice of alternating ±1 point charges; the electrostatic energy of one reference ion is U = (e²/4πε₀)·Σ_{j≠0} q_j/r_j = −M·e²/(4πε₀·r₀), defining the Madelung constant M = −Σ_{j≠0} (−1)^{i+j+k}/√(i²+j²+k²) (rock salt, r in nearest-neighbour units), a pure number. The recovery sums ONLY ±1/r with the neutral-cell weights {1, ½, ¼, ⅛}: an ion on the face of the summation cube of half-side n contributes ½ its charge, an edge ion ¼, a corner ⅛, so every cubic shell is charge-neutral (Evjen 1932) and the conditionally-convergent sum converges. M is loaded from the reference ONLY to score. Six derisk gates: (A) canonical — the neutral cube at n = 32 (274,625 sites) recovers M(NaCl); (B) convergence — doubling n cuts the truncation error by ≥ 6× over two (n,2n) pairs; (C) dimensional sweep — the same machinery in 1-D/2-D/3-D returns 2 ln 2 / 1.615543 / 1.747565; (D) sphere rival — the naive fixed-radius (un-neutralised) truncation swings with O(1) amplitude and ends > 0.5 from M; (E) Riemann rival — the 1-D alternating series = 2 ln 2 natural, = 3 ln 2 reordered (gap ≥ 0.5); (F) non-circularity — the generator has no M literal and no ln-2 closed form, and a wrong reference (M×1.02) fails gate A while the recovered value is unchanged.
M = −Σ_{j≠0} (±1)/r_j summed over expanding neutral (Evjen) cubes; U = −M·e²/(4πε₀·r₀)
1.7475646
2.1900e-8
32
2.7000e-8
| N | Error ratio |
|---|---|
| 10→20 | 16 |
| 16→32 | 16 |
| Dimension | Recovered | Known | Note | Rel error |
|---|---|---|---|---|
| 1 | 1.386294 | 1.3862944 | = 2 ln 2 exactly (alternating harmonic series) | 9.0000e-8 |
| 2 | 1.615543 | 1.6155426 | square lattice | 3.0000e-8 |
| 3 | 1.747565 | 1.7475646 | rock salt (NaCl) | 2.2000e-8 |
true
the live module renders shells up to n = 6 and continues the sum to n = 24; the shown M(24) = 1.7475647155 sits +1.21×10⁻⁷ above the known M and +8.26×10⁻⁸ above the oracle's n = 32 recovery — pure truncation, PRICED by the derived tail ceiling |M(24)−M(48)|·r/(r−1) = 1.36×10⁻⁷ (r = 6, the reference's own convergence-gate ratio; measured ≈ 16 — no free constants), disclosed on screen ('rendered n ≤ 6; sum continues to n = 24'). The shown float ≠ the module's M_NACL comparison literal bit-for-bit, though both render '1.747565' at 6 dp (disclosed coincidence — earned-ness is proven by the 24 distinct bit-matching M(n) waypoints of the growth trajectory, not string difference)
recovered M(NaCl) = 1.747564633 from the raw ±1/r neutral-cube sum; M is loaded from the reference only to score, and a scoring self-test confirms a deliberately-wrong reference (M×1.02) makes the oracle FAIL while the recovered value is unchanged. All 12 derisk gates pass (A–F science + G–L module-honesty certificate); tamper self-tests: known_value → 1.8 ⇒ gates A,B,J FAIL, exit 1, recovered value unchanged, restored by hand; module byte-edit ⇒ only sha gate G fails; replica 1-ulp nudge caught at call 21.
The Madelung constant of the rock-salt structure (Madelung 1918; Evjen 1932; Kittel, 'Introduction to Solid State Physics'): M = 1.747565, the dimensionless factor in the electrostatic cohesive energy U = −M·e²/(4πε₀·r₀) of an ionic crystal. This world VALIDATES, not derives: it assumes only the lattice geometry and the Coulomb law ±1/r and recovers M as a pure number by summation, arranged to be NON-CIRCULAR — the generator writes only ±1/r and the neutral-cell weights {1,½,¼,⅛}, never M or any closed form for it (the 1-D 2 ln 2 is a scoring target, absent from the generator). The substantive content beyond the number is the CONDITIONAL convergence: Σ ±1/r has no order-independent value (Riemann's rearrangement theorem), so the naive expanding-sphere sum genuinely fails to converge while the neutral-cell (Evjen) ordering — doing real physics by keeping each shell charge-neutral — locks onto M; the 1-D case makes this exact (natural order 2 ln 2, reordered 3 ln 2). It is DISTINCT from ?world=bragg (X-ray diffraction off the same kind of lattice — a reciprocal-space interference condition, not an energy) and ?world=ising / ?world=xy (spin lattices — nearest-neighbour exchange, not long-range Coulomb): madelung is the lab's first CRYSTAL-ELECTROSTATICS world, the long-range lattice sum that sets cohesion. Its conditional-convergence hazard is the same one that governs every long-range lattice sum (dipole arrays, Ewald summation in molecular dynamics). The lab's first ionic-cohesion world; opens a lattice-energetics family (CsCl M = 1.762675, zinc blende 1.638055, dipole sums).
npm run derisk -- madelung (scripts/madelung-derisk.mjs)scripts/oracles/madelung.reference.jsonE. Madelung, Physikalische Zeitschrift 19, 524 (1918) — the lattice constant for ionic crystals. H. M. Evjen, Phys. Rev. 39, 675 (1932) — the neutral-cell summation. C. Kittel, 'Introduction to Solid State Physics' — M(NaCl) = 1.747565. D. Borwein, J. M. Borwein & K. F. Taylor, J. Math. Phys. 26, 2999 (1985) — conditional convergence and order-dependence of Madelung sums. B. Riemann (1854) — the rearrangement theorem. Reference values (scoring only): M(NaCl) = 1.7475645946, 1-D = 2 ln 2 = 1.3862943611, 2-D square = 1.6155426267.