← Back to Gallery

Integer Partitions Detect the Primes

An interactive exploration of Ono, Craig & van Ittersum's discovery that prime numbers satisfy special Diophantine equations in MacMahon partition functions

Based on: "Integer partitions detect the primes" — W. Craig, J.-W. van Ittersum, K. Ono (PNAS, 2024)

The Prime-Detecting Equation (Theorem 1)

An integer n ≥ 2 is prime if and only if:
(n² − 3n + 2) · M₁(n) − 8 · M₂(n) = 0
2
PRIME

Equation Evaluation

Partitions of 2

Prime Detection Across the Number Line

📊 Equation Value vs. n — Primes hit zero

What is Ma(n)?

MacMahon's partition function Ma(n) sums the products of part multiplicities across all partitions of n that use exactly a distinct part sizes. For example, 6 = 2+2+1+1 has 2 distinct parts (sizes 1 and 2) with multiplicities 2 and 2, contributing 2×2 = 4 to M₂(6).

Why is this surprising?

Primes are defined by multiplication (not divisible by smaller numbers), yet they are precisely detected by partition functions — objects from additive number theory. This bridges the multiplicative and additive worlds of mathematics in an unexpected way.

The Discovery

Craig, van Ittersum, and Ono proved that infinitely many such prime-detecting equations exist using MacMahon partition functions. The simplest is shown above. A second equation uses M₃(n): (3n³−13n²+18n−8)M₁(n) + (12n²−120n+212)M₂(n) − 960·M₃(n) = 0.

Historical Roots

The proof connects MacMahon's Partition Analysis (1916), the Hardy-Ramanujan asymptotic formula (1918), and the theory of quasimodular forms — tools so classical that Ono noted this result "could have been found in the 1950s."