Mersenne Primes - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Number Theory: Mersenne Primes

Getting Started

While any command in the package can be referred to using the long form, for example, NumberTheory:-IsMersenne, it is often easier to load the package and then use the short form command names.

restart;

with(NumberTheory):

Examples

Mersenne Primes are prime numbers that are one less than a power of 2. These are of the form:  Mn=2n1, where n is a positive integer. The IthMersenne command returns the exponent for the Ith Mersenne prime number:

IthMersenne4

7

(1)

271

127

(2)

The top level isprime command determines if a given number is prime:

isprime271

true

(3)

The IsMersenne command checks if a positive integer, n, is a Mersenne exponent, where 2^n-1 is a Mersenne prime:

221

3

(4)

IsMersenne2

true

(5)

2111

2047

(6)

IsMersenne11

false

(7)

ifactor2111

2389

(8)

There are 49 known Mersenne Primes.

interfacertablesize=52:

DataSeriesseqIthMersennei,i=1..49,labels=seq1..49

Warning, the rankings of the 45th to 51st Mersenne primes are provisional, since it has not been determined that there do not exist more Mersenne primes between 44th and 51st

(9)

See Also

NumberTheory