There are two different definitions of generalized Fermat numbers, 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 with , while Riesel (1994) further generalizes, defining it to be a number of the form . Both definitions generalize the usual Fermat numbers . The following table gives the first few generalized Fermat numbers for various bases .
OEIS | generalized Fermat numbers in base | |
2 | A000215 | 3, 5, 17, 257, 65537, 4294967297, ... |
3 | A059919 | 4, 10, 82, 6562, 43046722, ... |
4 | A000215 | 5, 17, 257, 65537, 4294967297, 18446744073709551617, ... |
5 | A078303 | 6, 26, 626, 390626, 152587890626, ... |
6 | A078304 | 7, 37, 1297, 1679617, 2821109907457, ... |
Generalized Fermat numbers can be prime only for even . More specifically, an odd prime is a generalized Fermat prime iff there exists an integer with and (Broadhurst 2006).
Many of the largest known prime numbers are generalized Fermat numbers. Dubner found ( digits) and ( digits) in September 1992 (Ribenboim 1996, p. 360). The largest known as of January 2009 is (http://primes.utm.edu/primes/page.php?id=84401), which has decimal digits.
The following table gives the first few generalized Fermat primes for various even bases .
prime | |
2 | 5, 17, 257, 65537, ... |
4 | 17, 257, 65537, ... |
6 | 37, 1297, ... |