n_nth_prime, n_nth_prime_bounds
Synopsis
#include <flint/ulong_extras.h>n_nth_prime makes sure the table of cached primes is large enough and looks up the entry. n_nth_prime_bounds does not check for overflow, so its bounds are meaningless for large . It uses the estimates, valid for ,
The first inequality is due to Dusart [Dus1999] and the last to Massias and Robin [MasRob1996].
References#
- [Dus1999] P. Dusart, "The prime is greater than for ," Math. Comp., 68:225 (January 1999) 411–415.
- [MasRob1996] J. Massias and G. Robin, "Bornes effectives pour certaines fonctions concernant les nombres premiers," J. Theorie Nombres Bordeaux, 8 (1996) 215-242.
Cite this page
The FLINT team, “n_nth_prime, n_nth_prime_bounds (ulong_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ulong_extras/n_nth_prime.html (generated 2026-11-02).
@misc{flint-doc-ulong-extras-n-nth-prime,
author = {{The FLINT team}},
title = {{n\_nth\_prime, n\_nth\_prime\_bounds (ulong\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ulong_extras/n_nth_prime.html},
note = {Generated 2026-11-02}
}