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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Number Theory : Queries : Is Mersenne Number

NumberTheory

  

IsMersenne

  

test whether a number is a Mersenne number

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

IsMersenne(n)

Parameters

n

-

positive integer

Description

• 

The IsMersenne(n) command returns  if  is prime,  if  is not prime, and  if the status is unknown.

• 

Cases where the status is unknown will generally take an extremely long time to return an answer.

• 

If  is prime, then it is said to be a Mersenne prime.

• 

There are currently 51 known Mersenne primes.

• 

For every composite number ,  is a not a prime.

Examples

(1)

(2)

(3)

(4)

(5)

The Tabulate command can be used to display Mersenne primes in a grid. The following table highlights any Mersenne primes with a pink background.

(6)

 

Note that V(r, c) can be modified to show tables for various values of r and c.

Compatibility

• 

The NumberTheory[IsMersenne] command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

NumberTheory

NumberTheory[IthMersenne]

 


Download Help Document