FLINT3.7.0-dev

fmpz_is_prime_pseudosquare

Synopsis#include <flint/fmpz.h>
int fmpz_is_prime_pseudosquare(const fmpz_t n)source

Returns 0 if n is composite and 1 if it is proved prime by the pseudosquare test (Theorem 2.7 of [LukPatWil1996]), using a table of pseudosquares up to 2^{64}. Returns -1 if n is too large (above about 94 bits).

References#

  • [LukPatWil1996] R. F. Lukes and C. D. Patterson and H. C. Williams "Some results on pseudosquares" Math. Comp. 1996, no. 65, 361–372
Cite this page

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