For 2ⁿ – 1 to be prime we also need n itself to be prime, but that is not sufficient. For example, 2¹¹ – 1 is composite even though 11 is prime. However, if you look at tables of Mersenne primes it is interesting to note that if you start with 2 and use that to make a new number 2ⁿ – 1 with n = 2 you get 3, then recycling the 3 you get 7, use n = 7 and you get 127, another prime! How long could this go on?
Let f(n) = 2ⁿ – 1. The iterations you get, starting from 2, are f⁰(2) = 2, f¹(2) = 3, f²(2) = 7, f³(2) = 127, f⁴(2) = 1701411834604692317316873037158884105727.
None, that is, until Euler combined his genius with an impish disbelief in Fermat’s conjecture to discover that g⁵(2) = 4294967297 = 641 * 6700417. And since then we have found many more composite Fermat numbers, and no further Fermat primes, leading to the complementary conjecture that all the rest are composite! It seems that we never learn to be humble around these things…
It takes a larger number to be “forever beyond reach” these days. Rather than the now puny 4294967297 we cower before f⁵(2) = 2¹⁷⁰¹⁴¹¹⁸³⁴⁶⁰⁴⁶⁹²³¹⁷³¹⁶⁸⁷³⁰³⁷¹⁵⁸⁸⁸⁴⁴¹⁰⁵⁷²⁷ – 1, and who can blame us?