numtheory(deprecated)/mersenne - Maple Help

numtheory(deprecated)

 mersenne
 nth Mersenne prime

 Calling Sequence mersenne(n) mersenne([i])

Parameters

 n, i - positive integers

Description

 • Important: The numtheory package has been deprecated.  Use the superseding commands NumberTheory[IthMersenne], NumberTheory[IsMersenne] instead.
 • The function mersenne computes Mersenne primes. If the argument n is an integer then mersenne(n) will return ${2}^{n}-1$ if ${2}^{n}-1$ is known to be prime.  Otherwise, if n is prime, but ${2}^{n}-1$ 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

Important: The numtheory package has been deprecated.  Use the superseding commands NumberTheory[IthMersenne], NumberTheory[IsMersenne] instead.

 > $\mathrm{with}\left(\mathrm{numtheory}\right):$
 > $\mathrm{mersenne}\left(3\right)$
 ${7}$ (1)
 > $\mathrm{mersenne}\left(\left[3\right]\right)$
 ${31}$ (2)
 > $\mathrm{mersenne}\left(4\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{mersenne}\left(224737\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{mersenne}\left(756853\right)$
 ${\mathrm{false}}$ (5)