What is the zeta function (the function born from an endless sum and tied to the primes)?
Also called: Riemann zeta function, ζ function
In one minute
The zeta function is the function you get by adding up “1 ÷ (that number to the power s)” for every whole number 1, 2, 3, …, as in 1 + 1/2^s + 1/3^s + …, and it is deeply tied to the prime numbers.
For example, with s = 2, 1 + 1/4 + 1/9 + … settles at π²/6 (about 1.645), the answer to the “Basel problem” that Euler solved. With s = 1, the sum grows without limit. The sum can also be rewritten as a product over the primes alone (the Euler product), and from this it follows that there are infinitely many primes.
The sum only gives a value when s is greater than 1, but in 1859 Riemann extended s to complex numbers (numbers shown as points on a plane) and joined the function up smoothly. The Riemann Hypothesis asks how the places where its value is 0 are arranged. Usually “the zeta function” means this one (the Riemann zeta function), and there are also relatives called “the zeta function of …”.
A common mix-up
“Adding up all the whole numbers, 1 + 2 + 3 + 4 + …, gives −1/12”
It is true that the number −1/12 is closely tied to this sum. The value at s = −1 of the extended zeta function, ζ(−1), is exactly −1/12. If you plug s = −1 into the sum 1 + 1/2^s + 1/3^s + … just by its form, “1 ÷ (n to the power −1)” becomes n, so it takes the form 1 + 2 + 3 + 4 + …, which is why the equation is sometimes written. But the sum only gives a value when s is greater than 1. The −1/12 at s = −1 is not the answer to a sum; it is the value of the function extended beyond the range of the sum. If you simply add, you get 55 up to 10 and 5,050 up to 100, the total grows without limit, and there is no answer. Still, one more thing is right. If, instead of stopping the sum abruptly, you fade the terms out smoothly as you add, the sum splits into “a part that grows without limit”, “−1/12” and “a part that shrinks to 0”, and changing how you fade does not change the −1/12. −1/12 shows up as the fixed number left over once the growing part is taken away.
Explained in pictures
Free to use in lessons, slides and posts with credit (CC BY 4.0).
Free to use in lessons, slides and posts with credit (CC BY 4.0).
Free to use in lessons, slides and posts with credit (CC BY 4.0).
Free to use in lessons, slides and posts with credit (CC BY 4.0).
You’re free to use these figures in lessons, slides and posts if you credit Naru News (naru.news). CC BY 4.0.
Think of it like this
Stretching the “add half each time” formula beyond its range
Add 1 + 1/2 + 1/4 + 1/8 + …, halving each time, and the total gets closer and closer to 2. For any x between −1 and 1, the sum 1 + x + x² + x³ + … (adding x multiplied again and again) always equals the simple formula “1 ÷ (1 − x)”. With x = 1/2, 1 ÷ (1 − 1/2) = 2, a perfect match.
But “1 ÷ (1 − x)” can be worked out for any x except 1. Put in x = 2 and you get 1 ÷ (1 − 2) = −1. Put x = 2 into the sum instead and you get 1 + 2 + 4 + 8 + …, which grows without limit. The formula “1 ÷ (1 − x)” is the sum stretched smoothly beyond the range where the sum makes sense, and −1 is the value of that stretched formula. “1 + 2 + 4 + 8 + … = −1” is not the answer to a sum.
The zeta function’s ζ(−1) = −1/12 works the same way. But the analogy differs in places. 1 ÷ (1 − x) is a simple formula, while extending the zeta function needs an elaborate formula with integrals, like the one Riemann used. Also, the zeta sum does not multiply one number x again and again; it adds up 1 divided by the s-th power of each of 1, 2, 3, ….
Key points
Why is it π²/6 when s = 2? (The Basel problem)
What do you get if you add up 1 + 1/4 + 1/9 + 1/16 + …, that is, 1 divided by the square of every whole number 1, 2, 3, …? This question became known as the “Basel problem”, and it defeated many top mathematicians, including the Bernoulli family (Jacob, Johann and Daniel).
In 1735, Euler gave the answer: π²/6, the square of pi divided by 6 (1.6449…). The number π, which belongs to circles, came out of a sum of whole numbers alone. Euler used a bold method: he took the formula that writes sine, a function born from the circle, as an endless sum, and applied the relations between the roots and coefficients of a polynomial to it.
Adding it up to check, you get 1.5498 with 10 terms, 1.6350 with 100 terms and 1.644933 with a million terms, slowly approaching π²/6. With the same method, Euler also found the values when s is even, such as π⁴/90 for s = 4 and π⁶/945 for s = 6.
Why does it grow without limit when s = 1? (The harmonic series)
1 + 1/2 + 1/3 + 1/4 + … is called the “harmonic series”. The terms keep getting smaller, yet the sum grows without limit.
Grouping the terms shows why. 1/3 + 1/4 is more than 1/4 + 1/4 = 1/2; the four terms from 1/5 to 1/8 add up to more than four 1/8s, which is 1/2; the eight terms from 1/9 to 1/16 also add up to more than 1/2; and so on. You can make as many groups worth more than 1/2 as you like, so you can keep adding 1/2 forever, and the sum has no ceiling.
But it grows very slowly: about 2.93 with 10 terms, about 5.19 with 100, and only about 14.39 with a million. The sum first passes 10 at the 12,367th term, and passing 20 takes about 272.4 million terms. The sum of x terms grows only about as fast as the natural logarithm of x (log x, a number that goes up by only about 2.3 each time x becomes ten times bigger).
If s is even slightly greater than 1, the terms shrink faster and the sum settles on one value. That is why the sum gives the zeta function’s value only when s is greater than 1.
Why does the sum become a product over primes? How does that show there are infinitely many primes?
For the prime 2, make the sum 1 + 1/2^s + 1/4^s + 1/8^s + … (a sum over the numbers made by multiplying 2 by itself). Make the same kind of sum for each prime 3, 5, 7, …, and multiply them all together. Opening the brackets gives every product you can make by picking one term from each bracket. For example, picking 1/4^s from the 2 bracket, 1/3^s from the 3 bracket and 1 from all the others gives 1/12^s (12 = 2 × 2 × 3).
Every whole number splits into a product of primes in only one way. So 1/1^s, 1/2^s, 1/3^s, … each turn up exactly once, and the zeta sum equals the product over the primes alone. This is called the Euler product. Euler showed it in a 1737 paper, and Riemann began his 1859 paper from this formula. Checking with s = 2, multiplying the brackets for the primes up to 7 gives about 1.595, and up to 100 about 1.642, approaching π²/6 (about 1.645).
This shows that there are infinitely many primes. If there were only finitely many primes, there would be only finitely many brackets. At s = 1, each bracket is a fixed number (for the prime 2, 1 + 1/2 + 1/4 + … = 2), so multiplying finitely many of them can only give a fixed number (if the only primes were 2, 3, 5 and 7, it would be 2 × 3/2 × 5/4 × 7/6 = 4.375). Yet the product equals the sum, and at s = 1 the sum is the harmonic series, which grows without limit. These cannot both be true, so there must be infinitely many primes.
How did Riemann extend s? (Analytic continuation)
When s is 1 or less, the sum has no answer: s = 0 gives 1 + 1 + 1 + …, and s = −1 gives 1 + 2 + 3 + …. In his 1859 paper, Riemann wrote that both the sum and the product over primes make sense only when the real part of s (explained just below) is greater than 1, and then found a different formula, using an integral, that works for any s.
Here s is a complex number. A complex number is written like 3 + 2i, using a number i whose square is −1, and it can be shown as a point on a plane: across is the ordinary-number part (the real part), and up is how many times i (the imaginary part). Riemann’s formula gives exactly the same values as the original sum where the real part is greater than 1, and it also gives values on the rest of the plane (only at s = 1 does the value shoot off to infinity).
Stretching a function smoothly beyond the range where its original form works, in this way, is called “analytic continuation”. On the complex plane, there is only one way to extend it while keeping it smooth (differentiable). That is why the extended values are fixed, one each.
Values of the extended function include ζ(0) = −1/2, ζ(−1) = −1/12 and ζ(−2) = 0. At the negative even numbers −2, −4, −6, … it is always 0. Euler had already studied the equivalent of its values at negative whole numbers before Riemann. Riemann wrote this function as ζ(s) (ζ is the Greek letter zeta), and that notation is still used today.
How are the zeros related to the Riemann Hypothesis?
A value of s where the zeta function is 0 is called a “zero”. The zeros at the negative even numbers −2, −4, −6, … follow right away from the form of the function, so they are called the “trivial zeros”. The product over primes shows that there are no zeros where the real part is greater than 1. All the other zeros, the “nontrivial zeros”, are infinitely many, and they all lie in the strip where the real part is between 0 and 1.
In his 1859 paper, Riemann built a formula for the number of primes below a number x using the nontrivial zeros. He wrote that it was “very probable” that all the nontrivial zeros lie on the line where the real part is 1/2 (in his wording, that “all roots are real”). This is the Riemann Hypothesis, and how the zeros are arranged decides how accurate the estimate of the number of primes is.
On November 20, 2026, a mathematician announced that he believes he has found a proof together with an AI. The next day, the two groups behind Lean (software in which a machine checks proofs) and its shared library of mathematics, Mathlib, certified that both the statement and the proof of the Riemann Hypothesis are correct. But there is still no paper that people can read, and it is still ahead for mathematicians to understand its new ideas and for it to appear in a journal and be broadly accepted. The arrangement of the zeros, how far it has been checked by computer, the steps from “proved” to “solved”, and the prize are explained in detail on the Riemann Hypothesis page.
Are there other “zeta functions”?
Yes. Usually “the zeta function” means the Riemann zeta function on this page, but functions of a similar form are also named “the zeta function of …”. For example, the “Hurwitz zeta function” is 1/a^s + 1/(a + 1)^s + 1/(a + 2)^s + …, the same kind of sum but starting from a instead of 1, and when a = 1 it is the same as the Riemann zeta function.
Zeta functions are also built for “number worlds” other than the whole numbers. They can be written as a product (an Euler product) using whatever plays the role of primes in that world, and they are deeply tied to how that world’s primes are spread out. In particular, for the zeta functions of curves over a world with only finitely many numbers in which you can add, subtract, multiply and divide (a finite field), the statement of the same form as the Riemann Hypothesis was proved by Weil in the early 1940s, and Deligne proved it for more general shapes too.
The Riemann zeta function is also the model for a large family of similar functions called L-functions, and there are hypotheses of the same form for them too (such as the Generalized Riemann Hypothesis).
Check yourself
Q1In the zeta-function sum 1 + 1/2^s + 1/3^s + …, what happens if you keep adding for s = 2 (1 + 1/4 + 1/9 + …) and for s = 1 (1 + 1/2 + 1/3 + …)?
Answer and explanation
Answer: B s = 2 settles at a value; s = 1 grows forever
For s = 2, 1 + 1/4 + 1/9 + … settles at π²/6 (about 1.645), the answer to the Basel problem that Euler gave in 1735. For s = 1, 1 + 1/2 + 1/3 + … (the harmonic series) grows without limit, very slowly, because you can make as many groups worth more than 1/2 as you like. The sum gives the zeta function’s value only when s is greater than 1.
More on this → Key points: Why does it grow without limit when s = 1? (The harmonic series)
Q2About the equation “1 + 2 + 3 + 4 + … = −1/12”, which says that adding up all the whole numbers gives −1/12, which explanation is right?
Answer and explanation
Answer: C The zeta function’s value at s = −1 is −1/12
−1/12 is ζ(−1), the value at s = −1 of the zeta function smoothly extended beyond the range of the sum. Ordinary adding gives 5,050 by 100 alone and grows without limit; it never approaches −1/12. The extended function’s value at s = 0 is ζ(0) = −1/2, not −1/12.
More on this → Key points: How did Riemann extend s? (Analytic continuation)
Q3In his 1859 paper, what did the mathematician Riemann do with the zeta function?
Answer and explanation
Answer: A Extended s to complex numbers and gave values beyond the sum
Riemann took s into the complex numbers and smoothly extended the function to the whole complex plane, including the places where neither the sum nor the product over primes gives a value (analytic continuation). That the s = 2 sum equals π²/6 (1735) and that the sum can be rewritten as a product of one bracket per prime (the Euler product, 1737) were both shown by Euler, and Riemann began his paper from the Euler product.
More on this → Key points: How did Riemann extend s? (Analytic continuation)
Related terms
- Riemann Hypothesis
- Prime number
- Euler product
- Analytic continuation
- Complex number
- Basel problem
- Harmonic series
- L-function
- Millennium Prize Problems
Sources and how we checked
- Bernhard Riemann, “On the Number of Prime Numbers less than a Given Quantity” (Monatsberichte der Berliner Akademie, November 1859; English translation by David R. Wilkins, preliminary version of 1998, on the Clay Mathematics Institute site; the start from Euler’s product and the sum, the notation ζ(s), both expressions converging only when the real part of s is greater than 1 while an always-valid expression can be found, ζ(s) being finite for every complex s except 1 and zero at the negative even integers, “it is very probable that all roots are real”, and the formula for the number of primes below x; read November 21, 2026)
- E. Bombieri, “Problems of the Millennium: the Riemann Hypothesis” (the Clay Mathematics Institute’s official problem description; Section I on defining the zeta function by the sum for real part greater than 1 and by analytic continuation on the whole complex plane, the pole at s = 1, the trivial zeros −2, −4, … and the statement about the nontrivial zeros; Section II on the Euler product, Euler’s study of the values at the even positive and negative integers, Riemann obtaining the analytic continuation from an integral formula, Riemann expressing the distribution of primes through the zeros, and the zeta function as the prototype of L-functions; Section IV on the zeta functions of curves over finite fields and their Euler products, and the corresponding Riemann hypothesis proved by Hasse (1934), Weil (early 1940s) and, for general varieties, Deligne; read November 21, 2026)
- NIST, “Digital Library of Mathematical Functions”, §25.2 (the definition of ζ(s) as the sum for real part greater than 1 and by analytic continuation elsewhere, its only singularity being the pole at s = 1, and the Euler product, 25.2.11; read November 21, 2026)
- NIST, “Digital Library of Mathematical Functions”, §25.6 (ζ(0) = −1/2, ζ(2) = π²/6, ζ(4) = π⁴/90 and ζ(6) = π⁶/945 in 25.6.1, the values at negative integers ζ(−n) = −B(n+1)/(n+1) in 25.6.3, and ζ(−2n) = 0 in 25.6.4. ζ(−1) = −1/12 was computed for this page by putting the Bernoulli number B₂ = 1/6 from the table in §24.2 into 25.6.3; read November 21, 2026)
- NIST, “Digital Library of Mathematical Functions”, §25.10 (the trivial zeros ζ(−2n) = 0, infinitely many zeros in the critical strip 0 < real part < 1, and the statement of the Riemann hypothesis) and §25.11 (the definition of the Hurwitz zeta function ζ(s,a) and ζ(s,1) = ζ(s)); read November 21, 2026
- NIST, “Digital Library of Mathematical Functions”, §1.10(ii) (analytic continuation: two analytic functions that agree on an arc are equal throughout the domain; read November 21, 2026)
- Andrew V. Sutherland, “Riemann’s zeta function and the prime number theorem” (MIT 18.785 Number theory I, Lecture 16 notes, Fall 2025: the definition of ζ(s), the Euler product (Theorem 16.2) and ζ(s) ≠ 0 for real part greater than 1, the analytic continuation with a simple pole at s = 1 (Theorem 16.3), the uniqueness of analytic continuation, and every global field having a zeta function intimately related to the distribution of its primes; read November 21, 2026)
- Keith Conrad, “The Infinitude of the Primes” (University of Connecticut course handout; Section 3 on Euler’s 1737 proof: multiplying the geometric series for each prime gives each 1/n exactly once by unique factorization, so the product is the harmonic series, and since the harmonic series diverges there are infinitely many primes; the sum of the reciprocals of the primes also diverges. The products over the primes up to 7 and up to 100 (for s = 1 and s = 2) were computed for this page; read November 21, 2026)
- Terence Tao, “254A, Notes 1: Elementary multiplicative number theory” (his blog, November 23, 2014: the sum of 1/n up to x being log x + γ + a small error, and the Euler product. The partial sums of the harmonic series and of 1 + 1/4 + 1/9 + … for 10, 100 and 1,000,000 terms, the numbers of terms at which the sum passes 10 and 20, and the grouping argument such as 1/3 + 1/4 > 1/2 were computed for this page; read November 21, 2026)
- Terence Tao, “The Euler-Maclaurin formula, Bernoulli numbers, the zeta function, and real-variable analytic continuation” (his blog, April 10, 2010: formulas such as 1 + 1 + 1 + … = −1/2 and 1 + 2 + 3 + … = −1/12 make no sense as ordinary infinite series; the smoothed partial sums are −1/12 + C N² + an error that goes to 0, for any smooth cutoff; the values of the continued function are nothing more than the constant terms of those sums. The partial sum 1 + 2 + … + 100 = 5,050 was computed for this page; read November 21, 2026)
- Leonhard Euler, “On the sums of series of reciprocals” (English translation of “De summis serierum reciprocarum”, 1735, on arXiv: finding 1 + 1/4 + 1/9 + … = π²/6 from the power series of the sine and Newton’s identities, and the values for s = 4 to 12; read November 21, 2026)
- MacTutor History of Mathematics (University of St Andrews), “Leonhard Euler” (the Basel problem having defeated many top mathematicians including the Bernoullis, Euler showing π²/6 in 1735, and Euler proving the connection between the zeta function and the primes in 1737; read November 21, 2026)
- The Euler Archive (University of the Pacific), “Variae observationes circa series infinitas” (E72: the paper in which Euler product expansions first appeared, written in 1737 and published in 1744 in volume 9 of the Commentarii of the St. Petersburg Academy; read November 21, 2026)
- Levent Alpöge’s remark (his website: his belief that, working with Claude, he found a proof of the Riemann Hypothesis; read November 21, 2026. The date of the announcement, November 20, 2026, and the fact that it has not yet been confirmed were checked in Scientific American’s article “Anthropic mathematician claims to prove Riemann hypothesis, most famous problem in all of math” of that day)
- Lean FRO and Mathlib Initiative, “Lean verification of the Riemann Hypothesis” (Lean community blog, joint statement of November 21, 2026: Alpöge’s proof as a Lean library of 17 million lines, depending directly only on Mathlib; dozens of people reporting correct compilation; two tools, comparator and con-leche, confirming that the theorem proved is exactly Mathlib’s statement of the Riemann Hypothesis, which has been carefully vetted by experts in Lean and number theory; checking by Lean’s kernel and the con-leche and con-ron checkers, which come with a formal proof relative to set theory that they cannot accept a false proof, among others; “We have full confidence that Alpöge’s proof of the Riemann Hypothesis is correct” and the certification that both the statement and the proof are correct; read November 24, 2026)
AI wrote this page from the sources above, and a different AI checked it against the text of those sources (November 21, 2026). A person with a master’s degree in science and a Japanese high-school science teaching license also read and checked it before publishing. Numbers are as of that date. If anything was hard to follow, you spot a mistake, or there’s a term you’d like explained, please write to [email protected].
Glossary
- AI agent
- AI alignment
- Alignment faking
- Artificial general intelligence (AGI)
- Artificial intelligence (AI)
- Backdoor
- Benchmark
- Chain of thought (CoT)
- Context window
- Data poisoning
- Deep learning
- Deepfake
- Diffusion model
- Embedding
- Emergent misalignment
- Evaluation awareness
- Fine-tuning
- Formal verification
- Generalization
- Generative adversarial network (GAN)
- Generative AI
- Goodhart’s law
- Gradual disempowerment
- Hallucination
- Hyperparameter
- Intelligence explosion
- Interpretability
- Jailbreaking
- Large language model (LLM)
- Latent space
- Machine learning
- Mixture of experts (MoE)
- Neural network
- Neuralese
- Overfitting
- Parameter
- Persona vectors
- Pre-training
- Prompt
- Prompt injection
- Reasoning model
- Recursive language model (RLM)
- Recursive self-improvement (RSI)
- Red teaming
- Reinforcement learning (RL)
- Retrieval-augmented generation (RAG)
- Reward hacking
- Reward model
- Shutdown resistance
- Sleeper agent
- Subliminal learning
- Superintelligence (ASI)
- System prompt
- Technological singularity
- Time horizon
- Token
- Transfer learning
- Transformer
- Accretion disk
- Black hole
- Black hole star
- Cosmic birefringence
- Event horizon
- Event Horizon Telescope (EHT)
- General relativity
- GPS
- Gravitational lensing
- Gravitational singularity
- Gravitational wave
- James Webb Space Telescope (JWST)
- Lagrange point
- Long-period radio transient (LPT)
- Neutron star
- Pulsar
- Quasar
- Sagittarius A*
- Space data center
- Spacetime
- Special relativity
- Speed of light
- Supermassive black hole
- White dwarf
