FLINT3.7.0-dev

arith_number_of_partitions_vec, arith_number_of_partitions_nmod_vec

Synopsis#include <flint/arith.h>
void arith_number_of_partitions_vec(fmpz * res, slong len)source
void arith_number_of_partitions_nmod_vec(nn_ptr res, slong len, nmod_t mod)source

Set res to p(0), p(1), \ldots, p(\mathit{len} - 1), exactly or modulo the modulus of mod, by inverting Euler's pentagonal series \prod_{k \ge 1} (1 - x^k) = \sum_{j \in \mathbb{Z}} (-1)^j x^{j(3j-1)/2} with _fmpz_poly_inv_series or _nmod_poly_inv_series. The cost is O(M(n)) operations on numbers of O(\sqrt n) bits, or modulo the modulus.

Cite this page

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