A Law Without a Modulus

For x³ − x − 1 no modulus predicts the pattern. An infinite product does: multiply out q∏(1 − qⁿ)(1 − q²³ⁿ) and its coefficients count the roots at every prime

A Law Without a Modulus

Modulo a prime p, the cubic x³ − x − 1 has three roots, one root or none, and no rule of the form “look at p modulo m” predicts which. Yet there is a law. Multiply out a single infinite product, and the coefficient of qp gives the answer for every prime at once.

Multiply It Out

Press Play to multiply in one pair of brackets at a time and watch the coefficients settle from the left. Then switch to “Only the primes” and see which values survive.

q · (1 − q)(1 − q²³) · … · (1 − q⁷)(1 − q¹⁶¹) · (1 − q⁸)(1 − q¹⁸⁴)
q − q2 − q3 + q6 + q8 + q10 − q12 − 2q13 − q14 − q16 + q17 + q18 + 2q19 + q20 + q21 − q22 − 2q24 − q25 + q28 − q29 + q30 − q31 + q32 − q33 + q36 + 2q37 + q39 − q40 − q41 − 2q42 − q43 − q44 + q45 + 3q48 + 2q49 − q51 − q52 − q53 − q54 − q55 − q56 + 2q58 + 3q59 + …
8
bracket pairs multiplied in
9 of 60
coefficients final
34
tiles changed by the last pair
−1, 0
values seen at primes so far
Multiplying by (1 − q8) takes a copy of everything so far, shifts it 8 places along, and subtracts it. The next bracket will shift by 9, which cannot reach below q10, so the first 9 tiles are settled.

Each tile is the coefficient of one power of q in the product so far: dark blue for −1, faint for 0, sky blue for 1, near-white for 2. Solid tiles are final; dashed, dimmed tiles can still change. Amber outlines mark prime exponents. Tap a tile to ask about it. Nothing here but multiplying brackets — no primes, no cubic, no number theory went in.

Go deeper:The Product η(z)η(23z)

The product being expanded is q ∏ (1 − qn)(1 − q23n), taken over n = 1, 2, 3, …. It begins q − q² − q³ + q⁶ + q⁸ − q¹³ − q¹⁶ + q²³ − …. Multiplying it out needs no number theory at all, only patience: each bracket shifts a copy of what is already there and subtracts it.

Behind it is Dedekind’s eta function, η(z) = q1/24 ∏ (1 − qn) with q = e2πiz. The product here is η(z)η(23z): the two fractional powers of q, 1/24 and 23/24, add up to the single q in front. It is a modular form of weight 1 and level 23 — see also Modular Forms for what those words mean.

Euler’s pentagonal number theorem says that ∏ (1 − qn) = Σ (−1)k qk(3k−1)/2, summed over all integers k: almost every coefficient is 0 and the rest are ±1. That is how the page expands the product quickly, and why a single coefficient far out can be read off without computing the ones before it.

Two Sides, One Answer

Step through the primes, or press Play to check every prime below 10,000: roots counted by trial on the left, a coefficient of the product on the right. Then try to break it with a random prime.

Arithmetic side
x³ − x − 1 ≡ 0 (mod 59)
012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
x = 4: x³ − x − 1 = 59 = 1 × 59
x = 13: x³ − x − 1 = 2,183 = 37 × 59
x = 42: x³ − x − 1 = 74,045 = 1,255 × 59
N(59) = 3
number of roots modulo p
N − 1 = 2
=
a = 2
agree
Automorphic side
q ∏ (1 − qn)(1 − q23n)
Multiplied out, the terms near q59 are
… − q54 + q58 + 2q59 + q62 + q64 …
a(59) = 2
coefficient of q59 in the product
16 of 16
primes below 10,000 checked so far agree (23 set aside)
1 (6.3%)
three roots, a(p) = 2
8 (50.0%)
one root, a(p) = 0
7 (43.8%)
no roots, a(p) = −1
—
primes above 10,000 tried, agreeing
At p = 59 the cubic has 3 roots, so N − 1 = 2; the coefficient of q59 in the product is 2. The two sides agree. Press Play to check every prime on the map.

Amber is the arithmetic side: every residue is tried in x³ − x − 1, and each root is shown with the multiple of p it produces. Sky is the automorphic side: one coefficient of the multiplied-out product. The map has one cell per prime below 10,000, in order, turning emerald when the two sides agree (pale for three roots, mid for one, dark for none) and rose for the ramified prime 23. A mismatch would show rose too. Primes above 10,000 are off the map; their coefficient is computed on the spot from the two pentagonal series.

Go deeper:A Reciprocity Law for S₃

Write N(p) for the number of roots of x³ − x − 1 modulo p and a(p) for the coefficient of qp in the product. The law is N(p) = 1 + a(p) for every prime p other than 23, so a(p) is 2, 0 or −1 according to whether the cubic has three roots, one, or none. The demo checks it prime by prime, which is evidence; the statement for all primes is a theorem, and the third demo shows the classical reason.

The Galois group of this cubic is S₃, the six permutations of its three roots, which is not abelian. For such a polynomial no congruence condition on p can describe the pattern (see also Reciprocity Laws). In modern language, the two-dimensional representation of S₃ gives an Artin L-function, and it equals the L-function of the weight 1 modular form η(z)η(23z).

Hecke knew examples of this kind in the 1920s. In 1974 Deligne and Serre showed that every weight 1 newform comes from a two-dimensional Galois representation. The converse — that every odd two-dimensional representation of this kind comes from a weight 1 form — followed from Khare and Wintenberger’s proof of Serre’s conjecture (2009), with earlier cases due to Langlands and Tunnell (1980–81).

A count of solutions on one side, the coefficients of a very symmetric function on the other: this match is the Langlands correspondence in miniature.

Three Quadratic Forms

Why does it work? Pick a prime from the strip and follow the two steps: is −23 a square modulo p, and if so, which form’s ellipse passes through a lattice point? Try 59, then 2, then 5.

Sorting p = 59 in two steps
Step 1. Is −23 a square modulo 59? Yes: 6² = 36 ≡ −23 (mod 59). Equivalently, 59 ≡ 13 (mod 23), and 13 is a square modulo 23.
Step 2. Which form takes the value 59? Q₁: (−5, −2), (7, −2), (−7, 2), (5, 2). Q₂: no solutions. Q₁ represents 59: three roots, a(59) = 2.
The forms predict three roots and a(59) = 2. Computed directly: x³ − x − 1 has roots 4, 13, 42 modulo 59, and the product gives a(59) = 2. All three agree.
48
primes below 500 with one root (−23 not a square)
34
with no roots (Q₂ represents p)
12
with three roots (Q₁ represents p)
59, 101, 167, 173, 211
first primes with three roots
The product is ½(θ₁ − θ₂): 60 of 60 coefficients agree
nr1(n)r2(n)(r1 − r2)/2a(n)agree
12011✓
202−1−1✓
302−1−1✓
42200✓
50000✓
64211✓
70000✓
84211✓
92200✓
100000✓
110000✓
124400✓
1302−1−1✓
140000✓
150000✓
1624−1−1✓
170000✓
184400✓
190000✓
200000✓
210000✓
220000✓
232011✓
2446−1−1✓
252011✓
264211✓
274211✓
280000✓
2902−1−1✓
300000✓
3102−1−1✓
324400✓
330000✓
340000✓
350000✓
366600✓
370000✓
380000✓
394211✓
400000✓
4102−1−1✓
420000✓
430000✓
440000✓
450000✓
4602−1−1✓
4702−1−1✓
488611✓
492011✓
5002−1−1✓
510000✓
524400✓
530000✓
5446−1−1✓
550000✓
560000✓
570000✓
584211✓
594022✓
600000✓

The canvas shows the whole-number points (x, y) and the ellipse where the chosen form equals p; amber dots are points exactly on it, violet dots lie inside. Move over the lattice to read the form’s value at any point. In the strip, emerald primes have three roots, sky one, grey none, and rose is 23. In the table r1(n) and r2(n) count the points with Q₁ = n and Q₂ = n, found by listing lattice points; a(n) comes from multiplying out the product. Q₃ is the mirror image of Q₂ and takes the same values.

Go deeper:The Class Group Behind the Product

There are exactly three reduced quadratic forms of discriminant −23: Q₁ = x² + xy + 6y², Q₂ = 2x² + xy + 3y² and Q₃ = 2x² − xy + 3y². Q₂ and Q₃ are mirror images and take the same values. A prime p other than 23 is sorted in two steps. If −23 is not a square modulo p, the cubic has exactly one root and no form represents p. If it is a square, then either Q₁ represents p and the cubic has three roots, or Q₂ does and it has none.

Step 1 is governed by a modulus: it depends only on p modulo 23, which is quadratic reciprocity for the field Q(√−23). Step 2 is not. Which form represents p is invisible to congruences, and that is where the cubic’s unpredictability lives.

The three forms are the class group of Q(√−23), which has order 3, and the roots of x³ − x − 1 generate its Hilbert class field: a prime splits completely there exactly when it is represented by the principal form Q₁. Counting representations gives theta series θi = Σ qQi(x, y), summed over all integer pairs (x, y), and the identity checked in the table is η(z)η(23z) = ½(θ₁ − θ₂). So the mysterious product is a difference of two theta series, and theta series are modular forms.

Not every equation has such a classical explanation. The Langlands program conjectures that a matching automorphic object exists regardless.

Key Takeaways

  • No rule about p modulo m predicts how many roots x³ − x − 1 has modulo p.
  • The coefficient a(p) of qp in q ∏ (1 − qn)(1 − q23n) does: the number of roots is 1 + a(p) for every prime except 23.
  • The product is the weight 1 modular form η(z)η(23z), equal to half the difference of two theta series.
  • Roots counted on one side, coefficients of a symmetric function on the other: Langlands in miniature.

Spot a mistake or have an idea?

Search