Visitar URL original
Generalized Fermat Number -- from Wolfram MathWorld
TOPICS
Search

Generalized Fermat Number


The term "generalized Fermat number" has two different definitions, one of which is more general than the other. Ribenboim (1996, pp. 89 and 359-360) defines a generalized Fermat number as a number of the form a^(2^n)+1 with integer a>2 and nonnegative integer n, while Riesel (1994) further generalizes, defining it to be a number of the form a^(2^n)+b^(2^n) for positive integers a and b and nonnegative integer n. Both definitions generalize the usual Fermat numbers F_n=2^(2^n)+1. The following table gives the first few generalized Fermat numbers a^(2^n)+1 for n=0, 1, ... and various bases a.

aOEISgeneralized Fermat numbers in base a
2A0002153, 5, 17, 257, 65537, 4294967297, ...
3A0599194, 10, 82, 6562, 43046722, ...
4A0002155, 17, 257, 65537, 4294967297, 18446744073709551617, ...
5A1995916, 26, 626, 390626, 152587890626, ...
6A0783037, 37, 1297, 1679617, 2821109907457, ...

For the form a^(2^n)+1 with integers a>=2 and n>=1, a generalized Fermat number can be prime only for even a. An odd prime p has this form iff there exists an integer i with i^2=-1 (mod p) and i^2<p (Broadhurst 2006). Indeed, these conditions force p=i^2+1, while p=a^(2^n)+1 gives i=a^(2^(n-1)).

Many of the largest known prime numbers are generalized Fermat numbers. Dubner found 200944^(2^(11))+1 (10,861 decimal digits) and 82642^(2^(11))+1 (10,071 decimal digits) in September 1992 (Ribenboim 1996, p. 360). The largest known as of Oct. 2026 for the form a^(2^n)+1 is 2524190^(2^(21))+1, which has 13,426,224 decimal digits and was found in Oct. 2025 (PrimePages 2026).

The following table gives the first few generalized Fermat primes a^(2^n)+1 with n>=1 for various even bases a.

aprime a^(2^n)+1
25, 17, 257, 65537, ...
417, 257, 65537, ...
637, 1297, ...

See also

Fermat Number, Fermat Prime, Near-Square Prime

Explore with Wolfram|Alpha

References

Update a linkBroadhurst, D. "GFN Conjecture." Post to primeform user forum. Apr. 1, 2006. http://groups.yahoo.com/group/primeform/message/7187Caldwell, C. "The Largest Known Primes." https://t5k.org/primes/lists/all.txt.Dubner, H. "Generalized Fermat Primes." J. Recr. Math. 18, 279-280, 1985.Dubner, H. and Keller, W. "Factors of Generalized Fermat Numbers." Math. Comput. 64, 397-405, 1995.Morimoto, M. "On Prime Numbers of Fermat Type." Sugaku 38, 350-354, 1986.Numberphile. "100000001 Is Divisible by 17." Dec. 9, 2025. https://www.youtube.com/watch?v=6JrFu0xj0bs.PrimePages. "2524190^(2097152)+1." Accessed Oct. 9, 2026. https://t5k.org/primes/page.php?id=141162.Ribenboim, P. The New Book of Prime Number Records. New York: Springer-Verlag, 1996.Riesel, H. Prime Numbers and Computer Methods for Factorization, 2nd ed. Boston, MA: Birkhäuser, pp. 102-103 and 415-428, 1994.Sloane, N. J. A. Sequences A000215/M2503, A059919, A078303, and A199591 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Generalized Fermat Number

Cite this as:

Weisstein, Eric W. "Generalized Fermat Number." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/GeneralizedFermatNumber.html

Subject classifications