## You are here

HomeP\'epin's theorem

## Primary tabs

# Pépin’s theorem

Theorem (Pépin). A Fermat number $F_{n}=2^{{2^{n}}}+1$ is prime only if

$3^{{\frac{F_{n}-1}{2}}}\equiv-1\mod F_{n}.$ |

In other words, if 3 raised to the largest power of two not greater than the Fermat number leaves as a remainder the next higher power of two when divided by that Fermat number (since $F_{n}-1=2^{{2^{n}}}$), then that Fermat number is a Fermat prime.

For example, $17=2^{{2^{2}}}+1$ is a Fermat prime, and we can see that $3^{8}=6561$, which leaves a remainder of 16 when divided by 17. The smallest Fermat number not to be a prime is 4294967297, as it is the product of 641 and 6700417, and $3^{{2147483648}}$ divided by 4294967297 leaves a remainder of 10324303 rather than 4294967296.

Synonym:

Pepin's theorem

Major Section:

Reference

Type of Math Object:

Theorem

Parent:

## Mathematics Subject Classification

11A51*no label found*

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff
- Corrections