the previous ones are the Fermat primes, indeed of this kind(2^(2^n))+1
The problem is that , given n, it is not known usually if the corresponding Fermat number is prime (usually not)

The Mersenne primes are
2^n - 1 ( I was not aware that this way of writing was almost universally understood) - when they are prime themselves.

n has to be prime indeed (Faldage, you were right) because if n = ab, then the above number cannot be prime
In that case, you could write
(2^a)^b - 1^b =

[2^a - 1 ] times { something else}