A Weiferich Prime is a prime number that satisfies the following equation: 2p-1 = 1(mod p2), where p is the Weiferich Prime. There are only 2 known Weiferich primes, and they are 1093 and 3511. All numbers up to 1.2*1015 have been tested (there is currently a search in progress testing until 1.5*1015), but there may be more Weiferich Primes above that. Weiferich primes were thought to be particularly important in the search for a proof to Fermat's Last Theorem (FLT), as A. Weiferich proved in 1909 that any counter-example to FLT would necessarily be a Weiferich prime.

The search for Weiferich primes slowed considerably in 1988, when Granville-Monagan proved that any Weiferich prime that could be a counter example to FLT must be above 714,591,416,091,389, which would make any effort to find a counter-example out of reach of almost any computing project, even now. Since FLT has been proven, the search for more Weiferich primes has slowed even more, and while there are several efforts to find another, it is probable that Weiferich primes will never again have the importance that they once did.

Other proven facts about Weiferich primes include:

  • 2P^2=2(mod p2)
  • A Weiferich prime p cannot have 2 as a primitive root, therefore:
  • If p=4x+1, then (p-1)/4 cannot be prime.
  • If p=8x+3, then (p-1)/2 cannot be prime.