Enter a number to check if it's a Mersenne number, or specify a range to generate all Mersenne numbers.
A Mersenne number, also known as a Mersenne prime (in some cases), is a number of the form \(M_n = 2^n - 1\), where \(n\) is a positive integer. Named after the French mathematician Marin Mersenne, these numbers play an important role in number theory and cryptography.
A number \(x\) is a Mersenne number if there exists a positive integer \(n\) such that \(x = 2^n - 1\).
Solution:
31 + 1 = 32
32 = \(2^5\) (Yes, 32 is a power of 2)
Result: 31 is a Mersenne number.
Solution:
255 + 1 = 256
\(256 = 2^8\) (Yes, 256 is a power of 2)
Result: 255 is a Mersenne number.
Solution:
10 + 1 = 11
11 is not a power of 2 (\(2^3 = 8\), \(2^4 = 16\))
Result: 10 is not a Mersenne number.