_arith_bernoulli_number_vec_multi_mod
Synopsis
#include <flint/arith.h>The function inverts
\frac{\cosh(x) - 1}{x^2} = \sum_{k \ge 0} \frac{x^{2k}}{(2k+2)!},
\qquad
\frac{x^2}{\cosh(x) - 1} = \sum_{k=0}^{\infty} \frac{(2-4k) B_{2k}}{(2k)!}
x^{2k}
modulo enough primes of \mathtt{FLINT\_BITS} - 1 bits to determine the numerators (bounded by arith_bernoulli_number_size plus the size of the denominator), which saves half of the work compared with x/(e^x-1) since the odd terms vanish [BuhlerCrandallSompolski1992]. The numerators are recovered by Chinese remaindering with a comb that uses only as many primes as each entry needs. The cost is O(n^2 \log^{O(1)} n).
References#
- [BuhlerCrandallSompolski1992] Buhler, J.P. and Crandall, R.E. and Sompolski, R.W. : Irregular primes to one million : Math. Comp. 59:2000 (1992) 717–722
Cite this page
The FLINT team, “_arith_bernoulli_number_vec_multi_mod (arith.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arith/_arith_bernoulli_number_vec_multi_mod.html (generated 2026-10-20).
@misc{flint-doc-arith-arith-bernoulli-number-vec-multi-mod,
author = {{The FLINT team}},
title = {{\_arith\_bernoulli\_number\_vec\_multi\_mod (arith.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/arith/_arith_bernoulli_number_vec_multi_mod.html},
note = {Generated 2026-10-20}
}