Mathematical Wonders

Can a pattern
fool us?

Watch a prime-generating pattern break, then compare counterexamples, exhaustive searches and machine-checked proofs.

Forty successes, one counterexample

Try n² + n + 41. Beginning at n = 0 it gives 41, 43, 47 and 53. Each of the first 40 values is prime. At n = 40, however, the expression is 40 × 41 + 41 = 41². At n = 41, it is 41 × 43. Both have obvious factors once the expression is rearranged.

Test the pattern

Use trial division through the square root to check each value. One small factor is enough to disprove primality.

n = 39 · 39² + 39 + 41 = 1601 · prime.

What a proof needs to cover

A search can prove a finite claim when the bound, enumeration and tests are justified. The cubic collision at 1729 is such a case. A claim about every positive integer takes additional reasoning, such as a general algebraic argument or induction.

For example, 1 + 3 + ⋯ + (2n − 1) = n² because the next odd number, 2n + 1, is exactly the difference (n + 1)² − n². Begin with 1 = 1² and repeat the step. Now the argument accounts for all positive n.

What a proof checker verifies

In systems such as Lean, the mathematical statement and proof are expressed in a formal language. A small checking kernel verifies the steps against definitions and inference rules. This makes it possible to check long arguments and reuse precisely stated lemmas.

Formalization still requires choosing the right statement and assumptions. A search algorithm or an AI system can propose steps. Checking them against a formal statement gives a different kind of evidence than observing that a proposed answer looks plausible.

Read the sources · Lean language reference · Lean · The mathlib library

Questions that remain open

The Riemann hypothesis proposes a precise location for the nontrivial zeros of the zeta function and is linked to how primes are distributed. The P versus NP question asks whether every decision problem whose proposed solutions can be verified efficiently can also be solved efficiently, using the standard meaning of polynomial time. Both are examples of claims that need a proof across an unlimited domain.

Read the sources · Clay Mathematics Institute · Millennium Prize Problems

Make a composite output on purpose

For f(n) = n² + n + 41, find infinitely many nonnegative n for which 41 divides f(n).

Reveal the explanation

Take n = 41k for k = 1, 2, 3, … . Then each term is divisible by 41 and the value is larger than 41. The inputs n = 41k − 1, k ≥ 1, also work.

Explore the archive

Search page titles and topics. Press / to open. Esc to close.