It states[1][2] that if p is a Proth number, of the form k2n + 1 with k odd and k <2n, and if there exists an integera for which
then pisprime. In this case p is called a Proth prime. This is a practical test because if p is prime, any chosen a has about a 50 percent chance of working, furthermore, since the calculation is mod p, only values of a smaller than p have to be taken into consideration.
Thus, in contrast to many Monte Carloprimality tests (randomized algorithms that can return a false positive), the primality testing algorithm based on Proth's theorem is a Las Vegas algorithm, always returning the correct answer but with a running time that varies randomly. Note that if a is chosen to be a quadratic nonresidue as described above, the runtime is constant, save for the time spent on finding such a quadratic nonresidue. Finding such a value is very fast compared to the actual test.
The largest known Proth prime as of 2016[update]is, and is 9,383,761 digits long.[3] It was found by Peter Szabolcs in the PrimeGridvolunteer computing project which announced it on 6 November 2016.[4] It is the 11-th largest known prime number as of January 2024, it was the largest known non-Mersenne prime until being surpassed in 2023,[5] and is the largest Colbert number.[citation needed] The second largest known Proth prime is , found by PrimeGrid.[6]
The proof for this theorem uses the Pocklington-Lehmer primality test, and closely resembles the proof of Pépin's test. The proof can be found on page 52 of the book by Ribenboim in the references.