Euler's prime-generating polynomial n²+n+41 yields 40 consecutive primes

pickover · x · 2026-10-26

Clifford Pickover highlights Euler's prime-generating polynomial f(n) = n² + n + 41 (equivalently n² − n + 41), which produces prime numbers for every consecutive integer n from 0 to 39 (1 to 40 in the other form) before finally failing. He muses that it feels like a divine gift — a polynomial sieve toward infinity — though the flood of primes eventually dries up.

Original post →

More from Fun

Fun channel →