English
Euler’s x² + x + 41: The Most Magical Prime-Generating Polynomial in History
The Prime-Generating Polynomial That Defies Belief
If polynomials held the Olympic Games, the undisputed champion would be this one:
f(x) = x² + x + 41.
At first glance, there’s nothing remarkable here. Just an ordinary quadratic trinomial.
But it became a legend because of one astonishing property: plug in any integer from 0 to 39, and the result is always a prime number.
How Euler Discovered This Formula
This formula was noticed by Leonhard Euler himself, back in the 18th century. He wasn’t merely solving equations for sport — he was searching for ways that polynomials could generate prime numbers. And this particular formula turned out to be almost perfect: 40 consecutive primes, one after another.
x = 0 → 41 (prime)
x = 1 → 43 (prime)
x = 2 → 47 (prime)
…
x = 39 → 1601 (prime)
Then, at x = 40, the magic breaks:
x² + x + 41 = 40² + 40 + 41 = 1681 = 41 × 41.
Why Prime-Generating Polynomials Matter
Polynomials are functions that produce an infinite sequence of numbers. But among all polynomials capable of outputting prime numbers, this one stands apart as the all-time record holder. It became the archetype for the entire search for prime-generating polynomials — a search that later informed foundational ideas in cryptography.
It still astonishes with its elegance: a simple trinomial that works like pure magic forty times in a row.
What Comes Next in the Study of Prime-Generating Polynomials
And yet, there is another polynomial — or rather, an entire class of polynomials — that hides a wealth of mysteries, puzzles, and unsolved problems. They deserve a story of their own.
