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 γn(a)\gamma_n(a) for an integer n≥0n \ge 0 (an exception is thrown for n<0n < 0), the coefficient in the Laurent series ζ(s,a)=1s−1+∑n=0∞(−1)nn!γn(a)(s−1)n\zeta(s,a) = \frac{1}{s-1} + \sum_{n=0}^\infty \frac{(-1)^n}{n!} \gamma_n(a) (s-1)^n. With a=1a = 1 these are the ordinary Stieltjes constants.

The function uses an integral representation that allows fast computation for extremely large nn [JB2018]. If nn is moderate and the precision high enough, it instead expands the Hurwitz zeta function in a power series at s=1s = 1 and reads off the last coefficient. For a=1a = 1, the power series of the deflated zeta function ζ(1+x)−1/x=∑n(−1)nγnxn/n!\zeta(1+x) - 1/x = \sum_n (-1)^n \gamma_n x^n / n! comes from acb_dirichlet_zeta_jet, which at very high precision uses the approximate functional equation (acb_dirichlet_l_fmpq_afe_jet) in time O~(p1.5)\tilde O(p^{1.5}). To compute all of γ0(a),…,γn(a)\gamma_0(a), \ldots, \gamma_n(a), expanding ζ(s,a)\zeta(s, a) once (for instance with acb_poly_zeta_series) is faster than calling this function repeatedly, unless nn 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-11-02).