nth Mersenne prime - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Group Theory : Numbers : Prime : numtheory/mersenne

numtheory[mersenne] - nth Mersenne prime

Calling Sequence

mersenne(n)

mersenne([i])

Parameters

n, i

-

positive integers

Description

• 

The function mersenne computes Mersenne primes . If the argument n is an integer then mersenne(n) will return 2n1 if 2n1 is known to be prime.  Otherwise, if n is prime, but 2n1 is not determinably prime, then mersenne(n) will return FAIL.  Finally, if n is composite it will return false.

• 

If the argument is a list with one integer element [i], then mersenne([i]) will return the ith Mersenne prime.  If the value is beyond Maple's precomputed list of Mersenne primes, an error will be issued.

• 

The command with(numtheory,mersenne) allows the use of the abbreviated form of this command.

Examples

withnumtheory:

mersenne3

7

(1)

mersenne3

31

(2)

mersenne4

false

(3)

mersenne224737

false

(4)

mersenne756853

false

(5)

See Also

numtheory[fermat]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam