# $F_{5}=2^{2^{5}}+1$ is not prime

In 1637 Fermat stated that $F_{5}=2^{2^{5}}+1=4294967297$ is prime. On the contrary Euler showed that:

$F_{5}=(2^{16})^2+1^{2}=62264^{2}+20499^2$.

Because of Fermat I know that $F_{5}$ mod $4$ is $1$. Does this help me a bit?

Euler made this awesome computation :

We have $641 = 1 + 5 \times 2^7$. Therefore $5 \times 2^7 \equiv -1 \; $. By squaring twice this congruence, we get : $5^4 \times 2^{28} \equiv 1 \; $. However we also have $5^4 + 2^4= 641$. Therefore, $- 2^4 \times 2^{28} \equiv 1 \; $, which yields $1 + 2^{32} \equiv 0 \; $. And since $32 = 2^5$, you are done showing that $F_5$ is not prime. Long live Euler's computations...

• This is an approach that does not use the fact of the squares. Nov 27, 2016 at 23:34

Yes, of course the fact of $$F_5=\left(2^{16}\right)^2+1^2=62264^2+20449^2$$

Helps alot, only consider the following Theorem:

If a prime can be expressed as sum of two squares, then the representation is unique.

Then in your problem you have two different representations, then $F_5$ isn't a prime number.

You can see a proof of this theorem in the link in the comment.