fmpz_is_prime_pocklington, fmpz_is_prime_morrison
Synopsis
#include <flint/fmpz.h>The n - 1 test of Pocklington and the n + 1 test of Morrison for odd n (non-square for Morrison), given the num_pm1 (num_pp1) primes pm1 (pp1) dividing n - 1 (n + 1). Return 0 if n is composite. Otherwise they set F to the factored part of n \mp 1 and R to (n \mp 1)/F and return 1, which proves that every prime factor of n is \equiv 1 \pmod F (respectively \equiv \pm 1). This proves n prime if F \ge \sqrt n (respectively F > \sqrt n + 1).
Cite this page
The FLINT team, “fmpz_is_prime_pocklington, fmpz_is_prime_morrison (fmpz.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz/fmpz_is_prime_pocklington.html (generated 2026-10-20).
@misc{flint-doc-fmpz-fmpz-is-prime-pocklington,
author = {{The FLINT team}},
title = {{fmpz\_is\_prime\_pocklington, fmpz\_is\_prime\_morrison (fmpz.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz/fmpz_is_prime_pocklington.html},
note = {Generated 2026-10-20}
}