FLINT3.7.0-dev

acb_dirichlet_stieltjes

Synopsis#include <flint/acb_dirichlet.h>
void acb_dirichlet_stieltjes(acb_t res, const fmpz_t n, const acb_t a, slong prec)source

Sets res to the generalised Stieltjes constant \gamma_n(a) for an integer n \ge 0 (an exception is thrown for n < 0), the coefficient in the Laurent series \zeta(s,a) = \frac{1}{s-1} + \sum_{n=0}^\infty \frac{(-1)^n}{n!} \gamma_n(a) (s-1)^n. With a = 1 these are the ordinary Stieltjes constants.

The function uses an integral representation that allows fast computation for extremely large n [JB2018]. If n is moderate and the precision high enough, it instead expands the Hurwitz zeta function in a power series at s = 1 and reads off the last coefficient. To compute all of \gamma_0(a), \ldots, \gamma_n(a), expanding \zeta(s, a) once (for instance with acb_poly_zeta_series) is faster than calling this function repeatedly, unless n is at least several hundred.

References#

Cite this page

The FLINT team, “acb_dirichlet_stieltjes (acb_dirichlet.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb_dirichlet/acb_dirichlet_stieltjes.html (generated 2026-10-20).