zeta

zeta(s)

Try it yourself:


Evaluate the Riemann zeta function

zeta(s) evaluates the Riemann zeta function, a special function related to the infinite series 1 + 1/2^s + 1/3^s + ... where that series converges. Zeta appears in analytic number theory, probability, physics, and formulas involving sums of powers.

Useful values and relationships

For example, zeta(2) equals pi^2 / 6. The function’s value at 1 is singular, so it is not an ordinary finite number. Use pi to build well-known exact expressions, pow for finite power calculations, and gamma when a related special-function formula calls for it.

Series versus analytic continuation

The defining positive-term series converges only for real s greater than 1, but zeta is defined more broadly through analytic continuation. That distinction matters for negative and complex arguments: a calculator can return a valid continued value even though the simple series itself would not converge. Compare values numerically with abs when working in the complex plane.

Input caveats

Do not evaluate zeta at its pole s = 1. Values near that point can be extremely large and sensitive to precision. Zeta is a specialized mathematical function, not a generic way to sum a list; use sum for finite data.

All functions