FLINT3.7.0-dev

_aprcl_is_prime_jacobi_additional_test

Synopsis#include <flint/aprcl.h>
int _aprcl_is_prime_jacobi_additional_test(const fmpz_t n, ulong p)source

The additional test of step 5 for a prime p∣Rp \mid R for which (Lp)(\mathcal L_p) was not established: looks for a prime q≡1(mod2p)q \equiv 1 \pmod{2p} (with 4∥q−14 \| q - 1 if p=2p = 2) such that n(q−1)/p≢1(modq)n^{(q-1)/p} \not\equiv 1 \pmod q and checks that the corresponding hh is a primitive root of unity (and for p=2p = 2 that q(n−1)/2≡−1(modn)q^{(n-1)/2} \equiv -1 \pmod n). Returns 2 if nn is proved composite, 1 if the condition holds, and 0 if no suitable qq was found.

Cite this page

The FLINT team, “_aprcl_is_prime_jacobi_additional_test (aprcl.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/aprcl/_aprcl_is_prime_jacobi_additional_test.html (generated 2026-11-02).