Intuitively, what separates Mersenne primes from Fermat primes?

It's easy to get that for Mersenne primes $n$ must be prime, and for Fermat primes $n$ must be a power of 2. Let's go to the hueristics.

Being prime is of course not random, but it is often useful to think of it as a random property of numbers. The prime number theorem tells us that a large number $n$ is prime with probability approximately $\frac{1}{ln(n)}$, using this lets compute the expected number of Mersenne primes throwing out the ones we know can't be prime.

$$\sum_{p \text{ prime}} \frac{1}{ln(2^p-1)} \sim c\sum_{p \text{ prime}}\frac{1}{p}$$

Which we know diverges, hence we expect infinitely many Mersenne primes. Moreover the rate of divergence tells us about how many Mersenne primes to expect up to a certain size. On the other hand, if we do the same analysis for Fermat primes:

$$\sum_{n} \frac{1}{ln(2^{2^n}+1)} \sim c\sum_{n}\frac{1}{2^n}$$

We get a convergent geometric series, hence we only expect finitely many such primes.


There is this observation:

$2^n-1$ is a candidate prime (no obvious factors) whenever $n$ is prime.

$2^n+1$ is a candidate prime only when $n=2^r$ (if $n$ is divisible by an odd prime $p$, so $n=pq$ one can extract a factor $2^q+1$, because $x^p+1$ has a factor $x+1$ - use $x=2^q$)

The candidates for Mersenne Primes occur considerably more frequently than the candidates for Fermat Primes.