Wieferich primes are prime numbers p for which 2^(p-1) - 1 is divisible by p² (rather than just by p, as Fermat's Little Theorem guarantees). Only two such primes are known: 1093 (discovered in 1913) and 3511 (discovered in 1922). Despite 103 years of computer searches reaching into the 100 quadrillions, no third example has been found. Heuristic arguments suggest there should be infinitely many, but this remains unproven.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Only 2 Primes Have This Property. We Don't Know Why.Added:
There is a property of prime numbers simple enough to state in a single line for which we know exactly two examples.
Two, in the entire infinite span of the integers after a century of computer search reaching into the 100 quadrillions, we have found exactly two prime numbers with this property. The first one is 1,93 found in 1913 by a German mathematician named Walddemar Mesner. The second one is 3,511.
Found 9 years later in 1922 by Nicholas Bagger. Since then, nothing. For 103 years, mathematicians have searched.
Computers have been pointed at this problem. Distributed computing projects have ground through more candidate primes than there are atoms in a grain of sand. And the count is still two. We do not know if a third one exists.
Huristic arguments back of the envelope probabilistic reasoning suggest there should be infinitely many but we cannot prove there's even a third. The next example if it exists lies somewhere beyond 10 the 17th or it lies nowhere at all. These two primes are called weeric primes. The property that defines them sits at the intersection of three deep areas of mathematics. for mace last theorem modular arithmetic and the way the integers behave in their two adict completion. This is the story of the two loneliest primes in number theory and of the deep theorem that gave them their name. To understand weick primes, we need to start with one of the oldest theorems in number theory. Pierre demar 1640 wrote a letter to a colleague about a pattern he had noticed. For any prime number p and any integer a not divisible by p, the value of a raised to the power p minus1 when divided by p leaves a remainder of 1. In compact notation, a p minus1 is congruent to 1 mod p. For p = 5, a = 2, 2 4 is 16, which is 15 + 1, which is 3 * 5 + 1. Rea 1 when divided by 5. The theorem holds for p= 7 a = 3 3 6 is 729 which is 104 * 7 + 1 remainder 1. This is fair little theorem and it is one of the foundational results of elementary number theory. It is the engine behind most modern primality tests. Every time your phone confirms a TLS connection, it is running an algorithm whose correctness depends on this exact theorem.
Now sharpen the question. Famas little theorem says that a p - 1 -1 is divisible by p for any prime p.
Sometimes though that quantity is divisible by something more than just p.
It might be divisible by p * 2 or p * 3 or p ^ 2 or even higher powers of p.
When does a p - 1 -1 get divisible by p^ 2 instead of just by p? This is a more refined question for most primes P and most integers A. This doesn't happen.
The quantity is divisible by P but not by P^ 2. But occasionally it does happen. And when it does, we say that P is a weeric prime to base A. The specific case A= 2. The simplest case where we are testing whether 2 to the P - 1 - 1 is divisible by P^ 2 gives us the original weeric primes. The classical case, the one we will focus on 2 pus1 congruent to 1 p^ 2 that is the entire defining equation and among all the primes ever tested only two of them satisfied. The two primes we are about to meet are named after a German mathematician named Arthur Vifik who proved a theorem in 1909 that gave these specific numbers their importance.
Viferik was 25 years old. He was writing his doctoral thesis at the University of Müster on Fermar's last theorem. The conjecture famously stated by Fermar in 1637 that the equation x to the n + y= z to the n has no positive integer solutions for any exponent n greater than 2. In 1909, Fermar's last theorem was still open. It would remain open for another 85 years until Andrew WS finally proved it in 1994.
But Vifer in 1909 proved a partial result. He showed that if a particular case of Ferment's last theorem held, specifically what is called case 1, where none of the three integers X, Y, Z are divisible by the exponent P. Then the prime p had to satisfy a strict arithmetic condition. Namely 2 the p - 1 - 1 had to be divisible by p^ 2. In other words, if ferment's last theorem case 1 was false for some odd prime p then p had to be a varic prime. This is a powerful constraint. It transforms the question is there a counter example to firm's last theorem case one into the question is there an odd vifpheric prime and we don't have to find every possible counter example we just have to check the viferic primes in 1909 no varic primes were known at all varik's theorem reduced fermit's last theorem case one to checking a tiny set of specific primes beautiful powerful and impossible to use because nobody could find any viferick primes to check. The search began 4 years after we theorem in 1913. A German mathematician named Walddemar Mesner found the first one. Mner checked candidate primes by hand. There were no electronic computers. There were tables of powers and modular arithmetic and there was patience. He worked through small primes one at a time. For each prime p he computed 2 p - 1 / p ^ 2 and checked the remainder. For p= 3 2 is 4 4 - 1 is 3 3 / 9 is 0 remainder 3 not weick for p= 5 2 4th is 16 - 1 is 15 15 / 25 is zero remainder 15 not weick for p = 7 2 6 is 64 64 - 1 is 63 63 / 49 is 1 remainder 14, not weak.
For most small primes, the calculation produces a residue that has nothing special about it. The check fails. Mner worked through hundreds of primes, then thousands. At P= 1,093, the residue came out to zero.
193 is a weiferic prime. 2,92US 1 is divisible by 193 2. The first explicit example. This was published in the sitsunpicka of the Berlin Academy of Sciences. It was the first concrete instance of viferik's theorem in action.
Mathematicians could now use the constraint productively. The community immediately tried to find more. Hand calculation continued. For the next 9 years, no second vir prime turned up.
Many wondered if 193 was a one-off, an anomaly in the integers with no companions. Then in 1922, the next one appeared. Nicholas Beager was a Dutch mathematician working at the University of Amsterdam. He continued where Mesner had left off, checking primes one by one through hand and increasingly mechanical aid. He reached 3,511.
The check passed. 3511 was the second Vif prime. That was the last one anyone has found in either direction.
Let that settle. Since 1922, computers have improved from rooms full of vacuum tubes to silicon chips packing billions of transistors. We have built distributed computing networks, GPU accelerated number theory libraries, optimized modular exponentiation algorithms. We have searched every prime up to 10 to the 17th. That is every prime up to 100,000 trillion. In all of that, no third VFR prime has been found.
A typical recent search effort, Prime Grid's VR search, a distributed computing project running on tens of thousands of volunteer computers, has tested every odd prime below 10 to the 17th. They confirmed both 1,93 and 3,511 and they found nothing else.
We can think of this concretely. If you write out 2 raised to the p min -1 - 1 for every prime p in the range 1 to 10 to the 17th and divide each one by p^ 2 the remainder is zero in exactly two cases the two we know and nowhere else.
If a third we prime exists it is larger than 10 to the 17th. There are infinitely many primes above that bound, of course. But the third one, if it exists, has so far refused to reveal itself despite 100 years of looking. So, we have two questions. Why are these two specific numbers 1,93 and 3,511 viferish primes? And how many more are there? To both questions, our answer is essentially we don't know. There is a way to reason about how many wifer primes there should be. Take a random prime p. The value of 2 to the p minus1 mod p ^ 2 can be any number in the range 0 to p ^ 2 - 1. Well, almost any number.
It has to be congruent to 1 p, which restricts it to one of exactly p possibilities. Of those p possibilities, exactly one of them is the value 1.
Meaning 2 the p minus 1 = 1 p ^2 which is the wifrick condition. So heruristically treating the residue as random the probability that a given prime p is wifrick is roughly 1 / p. If we sum this over all primes using the fact that the sum of 1 / p over all primes up to n grows like log log n we get a rough estimate that the number of yerk primes below n is approximately log log n for n= 10 17th log log n is about 3.7.
So under this huristic we should expect roughly three or four wifrick primes below 10 the 17th. We have found two either we are slightly unlucky on the count or the huristic is somewhat off.
Either way the estimate suggests there are infinitely many wifer primes overall with the count growing extremely slowly.
But huristic is not proof. Nobody has shown that there are infinitely many wifer primes. Nobody has shown that there is even a third one. The argument I just gave assumes the residues are random and they are not random. They are determined by deep arithmetic structure that we don't fully understand.
This is the modern state of the question. We have a guess that says infinitely many. We have no proof. We have two examples. After a century of computation, that's the entire picture.
Huh? The weiferich condition has cousins. Many of them are equally mysterious.
First the obvious generalization we for each primes to base a. Instead of testing whether 2 the p minus 1 is congruent to 1 p^ 2 we test whether a to the p minus1 is for some other integer a. For each base a there is potentially a different list of wafer primes. Some bases have several known others have one. The base 2 case has the two we have been discussing.
Second we pairs. A weerich pair is a pair of primes P Q where P divides Q to the P minus 1 - 1 squared and vice versa. Only a handful of such pairs are known all with both primes small.
Third wall sunson sunson sunson sunson sunson sunson sunson sunson sunson sunson sun sun primes. These are primes p such that p square divides a certain Fibonacci related quantity. Specifically if f denotes the Fibonacci numbers a prime p is wall sun if f subp minus the legandra symbol of 5 p is divisible by p ^ 2 how many wall sunson sunson sunson sunson sunson sunson sunson sunson sunson sunson sunson primes do we know zero not one despite a heristic argument identical to the weerich heristic predicting infinitely many of them no one has ever found a wall sunson sunson sunson sunson sunson sunson sunson sunson sunson sunson sun prime we have computer searched every prime up to 9 * 10 17th and found nothing. This pattern huristics predicting infinitely many computer searches finding either two or zero is bizarrely consistent. It suggests there is some hidden arithmetic structure preventing these primes from being common. We don't know what that structure is. Fourth, the weiferage condition relates to a deeper concept in paddic analysis called the firmament quotient. For prime p and integer a define the firm quotient q subp of a as a the p - 1 - 1 all / p. This quotient is an integer. A we forage each prime is one where the firmer quotient of 2 modulo p equals zero. The behavior of these firmer quotients connects to the way the integers behave in their paddic completion. The alternative number system where instead of decimals getting smaller increasing powers of p get smaller. The structure there is rich and not fully understood. The weerage primes might be deep regularities of this padic structure or they might just be chance occurrences that happen to satisfy a coincidence. Mathematicians do not have the tools to distinguish these possibilities yet. Let's step back. We have a question. How many prime numbers have a specific simple property definable in a single line of modular arithmetic? The answer after 103 years of mathematical and computational effort is at least two, possibly more. We don't know. The two we know are 1,93 and 3,511.
This is unusual.
Most simple questions in number theory have either many known examples or strong reasons to believe in their non-existence. The weerish situation is uniquely uncomfortable. We have just enough examples to know the question is meaningful. We have far too few to draw any conclusions.
There is something philosophically jarring about this. The integers go on forever. The pattern that defines we primes is short and decidable. If the huristic count is right and there are infinitely many, they hide so far apart from each other that we cannot find a third in any reasonable amount of computational effort. If the heristic is wrong and there are finitely many, we cannot prove it. The state of the Weifer problem is in microcosm the state of much of modern number theory. We have computational evidence. We have huristic arguments. We have connections to deeper structures. But the bridge from heristic to proof remains uncrossed for problem after problem. The Goldbark conjecture, the twin prime conjecture, the Reman hypothesis itself. All of these have similar character, strong empirical evidence, no proof. The Weiferique primes are not famous like those problems. They sit in a quieter corner of number theory, kept alive by a small community of mathematicians and a longunning distributed computing project. But they tell the same story.
The integers are an old structure. We have been studying them since recorded mathematics began. We are still finding open questions with simpletoate answers that nobody can answer. The first wiferich prime was found in 1913. The second in 1922.
The third, if there is a third, may not be found in our lifetimes. What other simpleto-state arithmetic questions live in this in between state where we know almost nothing? Drop your favorite in the comments. We have several more queued up.
Related Videos
A Number Plus 5 Is 12
MathGirlTutor
101 views•2026-06-03
'A Different League of Mathematicians' - Numberphile
numberphile2
847 views•2026-06-04
Olympiad Mathematics | Indian | Can You Solve This One?
PhilCoolMath
650 views•2026-06-03
Escaping the Fog
LogicLemurGaming
760 views•2026-06-03
H2 Math June Holiday 2026 Intensive Revision | H2 Math Tuition by Achevas #singaporemath #h2math
AchevasTV
304 views•2026-06-01
A Brutal Radical Expression Made Easy! The Shortcut Changes Everything.
tamoshop
112 views•2026-06-02
V : jee main /advance class 11 mathematics : Binomial Theorem class-1 ( 29 may 2026 )
dcamclassesiitjeemainsadva9953
125 views•2026-05-29
Is This Pentomino Tileable?
3cycle
241 views•2026-05-30











