Function Repository Resource:

MersennePrime

Source Notebook

Find the nth Mersenne prime

Contributed by: Wolfram|Alpha Math Team

ResourceFunction["MersennePrime"][n]

returns the nth Mersenne prime number.

Details and Options

A Mersenne prime is a prime number of the form 2n-1.

Examples

Basic Examples (2) 

Find the third Mersenne prime:

In[1]:=
ResourceFunction["MersennePrime"][3]
Out[1]=

Find the tenth Mersenne prime:

In[2]:=
ResourceFunction["MersennePrime"][10]
Out[2]=

Publisher

Wolfram|Alpha Math Team

Version History

  • 2.0.0 – 23 March 2023
  • 1.0.0 – 10 April 2020

Related Resources

License Information