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 52 known Mersenne Primes.

interfacertablesize=55:

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

Warning, the rankings of the 49th to 52nd Mersenne primes are provisional, since it has not been determined that there do not exist more Mersenne primes between 48th and 52nd

122335475136177198319611089111071212713521146071512791622031722811832171942532044232196892299412311213241993725217012623209274449728862432911050330132049312160913275683933859433341257787351398269362976221373021377386972593391346691740209960114124036583422596495143304024574432582657453715666746426438014743112609485788516149742072815077232917518258993352136279841

(9)

See Also

NumberTheory


Download Help Document