All prime-squared Mersenne divisors are Wieferich
By Chris Caldwell
It has often been asked if all Mersenne numbers (with prime exponents) are square-free. The theorem we prove below makes this very likely because Wieferich primes are rare! But before we explain this, lets pause for a short proof break.
- Theorem.
- Let p and q be primes. If p2 divides Mq, then 2(p-1)/2 ≡ 1 (modp2), so in particular, p is a Wieferich prime.
- Proof.
-
First note that p and q must be odd. Elsewhere we have shown that if p divides Mq, then p = 2kq+1 for some integer k. So
2q ≡ 2(p-1)/2k ≡ 1 (mod p2).
Raising this to the kth power gives the first result of the theorem. Recall that the Wieferich primes are the primes p for which 2p-1 ≡ 1 (mod p2), so we can raise the modular equation above to the 2kth power to complete the proof. ∎
Comment. The only Wieferich primes less than 264 (the search limit as of February 2026) are 1093 and 3511. A short calculation shows that the squares of these primes divide no Mq. The next possible p with p2 dividing some Mq is the next possible Wieferich prime, which means p > 264. Since p2 divides Mq, we have (264)2 < p2 ≤ Mq = 2q-1, so 2128 < 2q-1 and q > 128, that is, Mq is square-free for all q < 128. This is not very helpful. For q somewhat larger than 128, Mq has been factored completely. One can look at the factors and see that no prime is repeated. This works for all q < 1213 (as of February 2026), so Mq is square-free for all q < 1213.
If we allow composite exponents, then every odd square n2 divides infinitely many "Mersennes" 2m-1; just make m any multiple of ϕ(n2), where ϕ(n) is Euler's ϕ function. Then we know n2 divides 2m-1 (and indeed bm-1 for all b relatively prime to n) by Euler's Theorem.