All formulas

Special functions

Riemann zeta function

special.riemann-zetaAlso called zeta, riemann zeta, zeta function, dirichlet series

ζ(s)=∑k=1∞1ks\zeta(s) = \sum_{k=1}^{\infty} \frac{1}{k^{s}}

The Dirichlet series of the Riemann zeta function, convergent for s > 1. At even whole s it is a rational multiple of a power of π: ζ(2) = π2/6, ζ(4) = π4/90.

Notation

ss

the exponent

s > 1

ζ(s)\zeta(s)

Result: the zeta function

scalar

Worked examples

Each result is solved exactly and confirmed by two independent computations.

  1. Given

    s=2s = 2

    Result

    ζ(s)=π26\displaystyle \zeta(s) = \frac{\pi^{2}}{6}

    ≈ 1.64493406685

  2. Given

    s=4s = 4

    Result

    ζ(s)=π490\displaystyle \zeta(s) = \frac{\pi^{4}}{90}

    ≈ 1.08232323371

  3. Given

    s=6s = 6

    Result

    ζ(s)=π6945\displaystyle \zeta(s) = \frac{\pi^{6}}{945}

    ≈ 1.01734306198

Common mistakes

  • Stops the series after a fixed number of terms

    The tail beyond N terms is about N1−s/(s − 1); with N = 1000 and s = 1.1 that is 5, larger than the partial sum's error budget by many orders of magnitude.

    Fix: Sum a few terms and add the Euler–Maclaurin tail, or call a library zeta.

  • Alternates the signs of the terms

    Σ (−1)k−1/ks is the Dirichlet eta function, η(s) = (1 − 21−s) ζ(s).

    Fix: Keep every term positive, or divide η(s) by 1 − 21−s.

Source

  • DLMF, eq. 25.2.1

    NIST Digital Library of Mathematical Functions. https://dlmf.nist.gov/ Release 1.2.8 of 2026-09-15. F. W. J. Olver, A. B. Olde Daalhuis, D. W. Lozier, B. I. Schneider, R. F. Boisvert, C. W. Clark, B. R. Miller, B. V. Saunders, H. S. Cohl, and M. A. McClain, eds.

    dlmf.nist.gov