Britannica Sources used in this answer

Why did Fermat's claim about numbers of the form 2^(2^n) + 1 being prime fail?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

Pierre de Fermat conjectured that all numbers of the form 22n+1 are prime because the formula yielded prime numbers for all values of n from 0 through 4 (specifically 3, 5, 17, 257, and 65,537).12

However, this claim failed for n=5. In the 18th century, the Swiss mathematician Leonhard Euler demonstrated that the number 225+1 (which equals 4,294,967,297) is not prime because it is divisible by 641. Consequently, these values are known as Fermat primes only for the first five cases, and it is now known that the formula does not produce primes for values of n from 5 through 30.123