then p is prime. 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.
Thus, in contrast to many Monte Carlo primality 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.
Examples of the theorem include:
- for p = 3 = 1(21) + 1, we have that 2(3-1)/2 + 1 = 3 is divisible by 3, so 3 is prime.
- for p = 5 = 1(22) + 1, we have that 3(5-1)/2 + 1 = 10 is divisible by 5, so 5 is prime.
- for p = 13 = 3(22) + 1, we have that 5(13-1)/2 + 1 = 15626 is divisible by 13, so 13 is prime.
- for p = 9, which is not prime, there is no a such that a(9-1)/2 + 1 is divisible by 9.
The largest known Proth prime as of 2016[update] is , and is 9,383,761 digits long. It was found by Szabolcs Peter in the PrimeGrid distributed computing project which announced it on 6 November 2016. It is also the largest known non-Mersenne prime and largest Colbert number. The second largest known Proth prime is , found by Seventeen or Bust.
- Paulo Ribenboim (1996). The New Book of Prime Number Records. New York, NY: Springer. p. 52. ISBN 0-387-94457-5.
- Hans Riesel (1994). Prime Numbers and Computer Methods for Factorization (2 ed.). Boston, MA: Birkhauser. p. 104. ISBN 3-7643-3743-5.
- Chris Caldwell, The Top Twenty: Proth, from The Prime Pages.
- "World Record Colbert Number discovered!".
- Chris Caldwell, The Top Twenty: Largest Known Primes, from The Prime Pages.
- Caldwell, Chris K. "The Top Twenty: Largest Known Primes".
- François Proth (1878). "Theoremes sur les nombres premiers". Comptes rendus de l'Académie des Sciences de Paris. 37: 926.
- Leonard Eugene Dickson (1966). History of the Theory of Numbers. 1. New York, NY: Chelsea. p. 92.