5

Is there a way to prove that $2$ is the only prime that never divides $2^n-1$ ? Obviously we can ignore all primes that are themselves of this form. Some other examples:

$$5\,|\,2^4-1 \qquad 9\,|\,2^6-1 \qquad 11\,|\,2^{10}-1 \qquad 13\,|\,2^{12}-1 \qquad 17\,|\,2^8-1$$

I checked for all $p<10^6$. Thanks in advance.

Bill Dubuque
  • 282,220
Christian
  • 2,185
  • 2
    This can be extended to every odd number : Euler's theorem guarantees $$2^{\varphi(k)}\equiv 1\mod k$$ for every odd $k$ , where $\varphi(k)$ is the totient function. Hence every odd number can divide a Mesenne number. – Peter Apr 09 '21 at 12:22
  • 2
    Your question is about primes dividing $2^n-1$ , so $9$ should be omitted in this context. I think, you mean $7$ instead of $9$ – Peter Apr 09 '21 at 12:25
  • 1
    for prime exponents $p$ the divisors are of form $2kp+1$ – Roddy MacPhee Apr 09 '21 at 12:34
  • @RoddyMacPhee A useful restriction to find the prime factors, without wanting to be pedantic, the "$2$" does not apply for the special case $p=2$, but in fact for every odd prime $p$. – Peter Apr 09 '21 at 12:39

3 Answers3

5

You have noted that $$ 3\mid 2^2-1,\quad 5\mid 2^4-1,\quad 7\mid 2^6-1,\quad 11\mid 2^{10}-1,\quad 13\mid 2^{12}-1,\quad 17\mid 2^8-1 $$ and the last one seems an outlier, but since $2^{16}-1=(2^8-1)(2^8+1)$, you still have that $17\mid2^{16}-1$.

Now do you see something? The exponent is the prime number minus $1$.

OK, the conjecture might be that $p\mid2^{p-1}-1$ when $p$ is an odd prime. Does this ring a bell? What about any $a$ with $0<a<p$? Oh, yes, it holds that $$ a^{p-1}-1\equiv 0\pmod{p} $$ by Euler's theorem: if $\gcd(a,n)=1$, then $a^{\varphi(n)}\equiv1\pmod{n}$, where $\varphi$ is the totient function. For $p$ a prime, $\varphi(p)=p-1$.

egreg
  • 244,946
1

See Fermat's little theorem: https://en.wikipedia.org/wiki/Fermat%27s_little_theorem

Your claim follows with $n=p-1$.

A. Pongrácz
  • 7,488
1

Just to offer a simple proof that does not rely on Fermat's little theorem, note that there are only $p$ different remainders possible when dividing by $p$ (whether $p$ is prime or not), so the remainders of $2,2^2,2^3,\ldots$ cannot all be different, i.e., we must have $2^h\equiv2^k$ mod $p$ for some pair of integers $h\lt k$, which means $p$ divides $2^k-2^h=2^h(2^{h-k}-1)$. Now if $p$ is an odd prime, it does not divide $2^h$, so it must divide $2^{k-h}-1$.

Barry Cipra
  • 81,321