partitions_leading_fmpz
Synopsis
#include <flint/partitions.h>Sets res to the dominant part of the leading term k = 1 of the Hardy–Ramanujan–Rademacher series for p(n),
\frac{\sqrt{12}}{24n - 1} \left(1 - \frac{1}{t}\right) e^{t}, \qquad t =
\frac{\pi \sqrt{24n - 1}}{6},
which omits the part e^{-t}(1 + 1/t) \sqrt{12}/(24n-1) of the term and approximates p(n) with relative error about e^{-t/2}. The precision of the exponential is increased by half the bit length of n for the argument reduction. Requires n \ge 1.
Cite this page
The FLINT team, “partitions_leading_fmpz (partitions.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/partitions/partitions_leading_fmpz.html (generated 2026-10-20).
@misc{flint-doc-partitions-partitions-leading-fmpz,
author = {{The FLINT team}},
title = {{partitions\_leading\_fmpz (partitions.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/partitions/partitions_leading_fmpz.html},
note = {Generated 2026-10-20}
}