Recall that a Wieferich prime is a prime number $p$ such that $2^{p-1} \equiv 1 \bmod p^2.$ It is not known whether there are infinitely many Wieferich primes, nor whether there are infinitely many non-Wieferich primes. In fact there are only $2$ known Wieferich primes.

I'm interested in a slightly different condition which I'm hoping is easier to handle. Namely, I can replace the exponent $p-1$ by the order of $2$ in $(\mathbb{Z}/p\mathbb{Z})^\times$. Moreover, I just want this power to hit the identity with odd $p$-adic valuation. Specifically:

Are there infinitely many primes $p$ such that $v_p(2^{\mathrm{ord}_p(2)}-1)$ is odd?

Here $\mathrm{ord}_p(n)$ denotes the order of $n$ in $(\mathbb{Z}/p\mathbb{Z})^\times$ (which divides $p-1$ by FLT), and $v_p$ is the $p$-adic valuation.

Note that the existence of infinitely many non-Wieferich primes would provide a positive answer to my question (since here $v_p(2^{p-1}-1) = 1$).

Ideally I'd also like to know that there collection of such primes has positive density, rather than just being infinite.

  • $\begingroup$ Do you possibly mean $v_p(2^{{\rm ord}_p(2)}-1)$ instead of $v_p(2^{{\rm ord}_p(2)})$? $\endgroup$
    – Arno Fehm
    Jun 29, 2020 at 20:37
  • $\begingroup$ Yes thanks, now fixed. $\endgroup$ Jun 29, 2020 at 20:44
  • 4
    $\begingroup$ Since $v_p(2^{{\rm ord}_p(2)}-1)=v_p(2^{p-1}-1)$, you might as well keep the exponent simpler. $\endgroup$ Jun 29, 2020 at 21:59
  • $\begingroup$ @Pace: Nice observation. How do you show this? $\endgroup$ Jun 30, 2020 at 10:32
  • 3
    $\begingroup$ @DanielLoughran Let $x={\rm ord}_p(2)$. Write $2^x=1+ap^k$ where $gcd(p,a)=1$. Now, the order of $2$ modulo any larger power of $p$ must be a multiple of $x$, say $xy$. We compute that $2^{xy}=(1+ap^k)^y=1+yap^k+$terms divisible by $p^{k+1}$. We see that this is $1$ modulo $p^{k+1}$ if and only if $p|y$. $\endgroup$ Jun 30, 2020 at 16:24

2 Answers 2


Suppose the answer is no and that the finitely many exceptions are all at most $B$. Let $\ell \equiv 1 \pmod{3}$ be prime and consider $n=2^{\ell} -1$. If $p>B$ is a factor of $n$, then $\ell$ is the order of $2$ modulo $p$, so $p$ occurs in $n$ with an even exponent, so $n = x^2c, c \le B!$. Let $y = 2^{(\ell - 1)/3}$. Then $n=2y^3 - 1$ and finally $2y^3 - 1 = cx^2$, so $(x,y)$ is an integral point on one of a finite collection of elliptic curves and there can be only finitely many such. But there are infinitely choices for $\ell$, contradiction. (This is a variant of an old argument of Granville.)

  • $\begingroup$ This is a very slick argument! However it doesn't seem to get positive density, which I was originally hoping for. Which paper of Granville does this appear in? $\endgroup$ Jun 30, 2020 at 10:35
  • 5
    $\begingroup$ I think one can make the argument a bit simpler, keeping the same basic idea. Since $\ell$ is the order of $2$ mod $p$, we have $p > \ell$. Thus, as long as we choose $\ell > B$, we have $2^{\ell}-1$ coprime to $B!$. So $n$ is actually a square, which is absurd since $n\equiv 3\pmod{4}$. In this variant there's no need to restrict the primes $\ell$ to the progression $\ell\equiv 1\pmod{3}$, $\endgroup$ Jun 30, 2020 at 19:01
  • 4
    $\begingroup$ I'm guessing the Granville paper in question is mathscinet.ams.org/mathscinet-getitem?mr=841645 . It seems that the state of the art only provides $\log X$ or so non-Weiferich primes up to $X$, even if one assumes the abc conjecture (see e.g. the recent paper mathscinet.ams.org/mathscinet-getitem?mr=3983273 ) so I doubt positive density is within reach of current methods. $\endgroup$
    – Terry Tao
    Jun 30, 2020 at 19:21
  • 2
    $\begingroup$ ... though on the other hand, this argument does seem to imply that for every prime $\ell$, there is a prime $p$ with $ord_p(2)=\ell$ and $v_p( 2^{ord_p(2)}-1)$ odd (because $2^\ell-1$ is not a square). Don't know if this is actually helpful for your application. $\endgroup$
    – Terry Tao
    Jul 1, 2020 at 0:38
  • 1
    $\begingroup$ @Terry Tao: This is a nice observation which could certainly be useful! It seems to give a more elementary proof of infinitude and also gives a stronger conclusion. $\endgroup$ Jul 1, 2020 at 15:53

Felipe refers to my first ever paper (mathscinet.ams.org/mathscinet-getitem?mr=789713) from 1985 ! However I have a more recent paper that gives a better result along the lines asked for (mathscinet.ams.org/mathscinet-getitem?mr=2997580) which shows that every $2^n-1$, with $n\ne1$ or $6$, has a primitive prime factor that divides it to an odd power.

  • $\begingroup$ Thanks Andrew! I'll take a look at your more recent paper. $\endgroup$ Jul 6, 2020 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.