# Mersenne Primes

**URL:** <https://boards.straightdope.com/t/mersenne-primes/166139>\
**Category:** Factual Questions\
**Created:** [April 3, 2003, 4:35am UTC](https://boards.straightdope.com/t/mersenne-primes/166139 "2003-04-03T04:35:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enola\_Straight](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@Enola\_Straight](https://boards.straightdope.com/u/Enola_Straight)\
**Post date:** [April 3, 2003, 4:35am UTC](https://boards.straightdope.com/t/mersenne-primes/166139/1 "2003-04-03T04:35:34Z")

</div>

A Mersenne prime has the form 2^n-1.

What do you call a prime of the form 2^n+1?

---

<div class="post-metadata">

**Author:** ![Q.E.D](https://avatars.discourse-cdn.com/v4/letter/q/51bf81/32.png) [@Q.E.D](https://boards.straightdope.com/u/Q.E.D)\
**Post date:** [April 3, 2003, 4:47am UTC](https://boards.straightdope.com/t/mersenne-primes/166139/2 "2003-04-03T04:47:06Z")

</div>

[Fermat primes](http://perso.wanadoo.fr/yves.gallot/primes/gfn.html):

> [@](#):
>
> In honour of the inspired pioneers, the numbers of the form 2[sup]n[/sup]-1 are now called the Mersenne numbers and the numbers of the form 2[sup]n[/sup]+1 the Fermat numbers.

---

<div class="post-metadata">

**Author:** ![Earthling](https://avatars.discourse-cdn.com/v4/letter/e/90db22/32.png) [@Earthling](https://boards.straightdope.com/u/Earthling)\
**Post date:** [April 3, 2003, 4:56am UTC](https://boards.straightdope.com/t/mersenne-primes/166139/3 "2003-04-03T04:56:55Z")

</div>

I don’t know, **QED**. My number theory textbook gives this definition:

> [@](#):
>
> A _Fermat number_ is an integer in the form[ul]F[sub]n[/sub] = 2[sup]2[sup]n[/sup][/sup] + 1,[/ul]If F[sub]n[/sub] is a prime, it is said to be a _Fermat prime_.

Other than that, it only says “these may be considered as a special case of the integers of the form 2[sup]m[/sup] +1.” No other name was given.

. . .

Well, further research leads me to [MathWorld](http://mathworld.wolfram.com/FermatNumber.html), which says that 2[sup]n[/sup] + 1 is the less common of the two definitions for Fermat numbers. So, that makes everybody happy, I suppose.

---

<div class="post-metadata">

**Author:** ![Q.E.D](https://avatars.discourse-cdn.com/v4/letter/q/51bf81/32.png) [@Q.E.D](https://boards.straightdope.com/u/Q.E.D)\
**Post date:** [April 3, 2003, 5:05am UTC](https://boards.straightdope.com/t/mersenne-primes/166139/4 "2003-04-03T05:05:13Z")

</div>

Fermat numbers are generally given in the form b•2[sup]n[/sup]+1, so 1•2[sup]n[/sup]+1 = 2[sup]n[/sup]+1 would be a special case.

---

<div class="post-metadata">

**Author:** ![Jabba](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@Jabba](https://boards.straightdope.com/u/Jabba)\
**Post date:** [April 3, 2003, 11:44am UTC](https://boards.straightdope.com/t/mersenne-primes/166139/5 "2003-04-03T11:44:58Z")

</div>

**Earthling** : Note that if 2[sup]n[/sup] + 1 is prime, then n is of the form 2[sup]m[/sup]. Thus any prime of the form 2[sup]n[/sup] + 1 is of the form 2[sup]2[sup]n[/sup][/sup] + 1, so either of the two definitions of Fermat prime will do.
