Prime if n=1, composite otherwise.
Chat with our AI personalities
A Mersenne prime has the form 2n-1. For 2n-1 to be prime, n must also be prime. Perfect numbers have the form 2n-1(2n-1) where 2n-1 is a Mersenne prime, so when a new Mersenne prime is discovered, another perfect number is also found.
Mersenne primes are mostly of interest as mathematical curios. A Mersenne prime has the form 2n-1. For 2n-1 to be prime, n must also be prime. Perfect numbers have the form 2n-1(2n-1) where 2n-1 is a Mersenne prime, so when a new Mersenne prime is discovered, another perfect number is also found.
Neither
A Mersenne number is a number of the form 2n-1. When this number is prime, it is known as a Mersenne prime.A Mersenne prime has the form 2n-1. For 2n-1 to be prime, n must also be prime. Examples are the Mersenne prime 7 (23 - 1 = 7) and the Mersenne prime 127 (27 - 1 = 127)
n * 2n = 2n2