Can a Mersenne number ever be a Carmichael number?
More specifically, can a composite number $m$ of the form $2^n-1$ ever pass the test: $a^{m-1} \equiv 1 \mod m$ for all intergers $a >1$ (Fermat's Test)?
Cases potentially proved so far: (That are never Carmichael numbers)
- where $n$ is odd
- where $n$ is prime
Work using "main" definition:
First off take the definition of a Carmichael number:
A positive composite integer $m$ is a Carmichael number if and only if $m$ is square-free, and for all prime divisors $p$ of $m$, it is true that $p - 1 \mid m - 1$.
Let's assume $m=2^n-1$ is squarefree. (Best case, and I believe it always is for $2^p-1$)
Take the case where $n$ (in $2^n-1$) is a prime $p$. All factors of $2^p-1$ must of the form: $2kp+1$ for some constant $k$. So will $2kp$ ever divide $2^p-2$? Factoring a $2$ out gives us $kp \mid 2^{p-1}-1$, or split into two: $k \mid 2^{p-1}-1$ and $p \mid 2^{p-1}-1$ must both be true. By Fermat's little theorem, $2^{p-1} \equiv 1 \mod p$, so $p \mid 2^{p-1}-1$ is always true.
So if $k \mid 2^{p-1}-1$ for $k = {q-1 \over p}$, is false for at least one factor $q$ of $2^p-1$, no Carmichael numbers can exist of form $2^p-1$.
Now for other cases where $n$ is composite, lets say $n=cp$, for some prime $p$, and some number $c$:
$\begin{align}2^{cp}-1&=(2^p-1)\cdot \left(1+2^p+2^{2p}+2^{3p}+\cdots+2^{(c-1)p}\right)\end{align}$
Thus: $2^{n-1} \mid 2^p-1$
Because of that, we must look at the factors of $2^p-1$ when considering if $2^{cp}-1$ is a Carmichael number. So we know those factors are already of form $2kp+1$, and then $kp \mid 2^{cp-1}-1$.
This is where I'm left. on an incomplete proof.
Using Bernoulli definition:
An odd composite squarefree number $m$ is a Carmichael number iff $m$ divides the denominator of the Bernoulli number $B_{n-1}$.
Using the Von Staudt–Clausen theorem, there may be a way to proof that that factors of the Bernoulli number denominators may never divide a mersenne number.