Skip to main content

ProveP

ProveP

Prove that a given number pp is prime

Primality proof from factors of p−1p-1

For each prime power qkq^k in the factored portion ss of p−1p-1, ProveP finds a witness showing that every prime factor of pp is 11 modulo qkq^k.
  1. 1Factor p−1p-1 and rigorously identify its prime factors.
  2. 2For each qq, find aa such that ap−1≡1(modp)a^{p-1}\equiv1\pmod p and gcd⁡(a(p−1)/q−1,p)=1\gcd(a^{(p-1)/q}-1,p)=1.
  3. 3Multiply the certified prime powers into ss.
  4. 4Once s>ps>\sqrt p, conclude that pp is prime.