This site is supported by donations to The OEIS Foundation.

# Generalized Fermat numbers

The generalized Fermat numbers (Riesel (1994)) are numbers of the form

${\displaystyle {\rm {F}}_{n}(a,b)\equiv a^{2^{n}}+b^{2^{n}},\quad a\geq 2,\,n\geq 0.\,}$

The (less) generalized Fermat numbers (with ${\displaystyle \scriptstyle b\,=\,1\,}$) (Ribenboim (1996)) are

${\displaystyle {\rm {F}}_{n}(a)\equiv {\rm {F}}_{n}(a,1)=a^{2^{n}}+1^{2^{n}}=a^{2^{n}}+1,\quad a\geq 2,\,n\geq 0,\,}$

where the ordinary Fermat numbers are

${\displaystyle {\rm {F}}_{n}={\rm {F}}_{n}(2)={\rm {F}}_{n}(2,1),\,n\geq 0.\,}$

## Generalized Fermat numbers a^(2^n) + 1

Generalized Fermat numbers a^(2^n) + 1
${\displaystyle a\,}$ ${\displaystyle \scriptstyle {\rm {F}}_{n}(a)\,=\,a^{2^{n}}+1,\,a\,\geq \,2,\,n\,\geq \,0,\,}$ sequences A-number
2 {3, 5, 17, 257, 65537, 4294967297, 18446744073709551617, 340282366920938463463374607431768211457, 115792089237316195423570985008687907853269984665640564039457584007913129639937, ...} A000215${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
3 {4, 10, 82, 6562, 43046722, 1853020188851842, 3433683820292512484657849089282, 11790184577738583171520872861412518665678211592275841109096962, ...} A059919${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
4 {5, 17, 257, 65537, 4294967297, 18446744073709551617, 340282366920938463463374607431768211457, 115792089237316195423570985008687907853269984665640564039457584007913129639937, ...} A000215${\displaystyle \scriptstyle (n+1,\,n\,\geq \,0)\,}$
5 {6, 26, 626, 390626, 152587890626, 23283064365386962890626, 542101086242752217003726400434970855712890626, ...} A199591${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
6 {7, 37, 1297, 1679617, 2821109907457, 7958661109946400884391937, 63340286662973277706162286946811886609896461828097, ...} A080174${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
7 {8, 50, 2402, 5764802, 33232930569602, 1104427674243920646305299202, 1219760487635835700138573862562971820755615294131238402, ...} A078304${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
8 {9, 65, 4097, 16777217, 281474976710657, 79228162514264337593543950337, 6277101735386680763835789423207666416102355444464034512897, ...} A152581${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
9 {10, 82, 6562, 43046722, 1853020188851842, 3433683820292512484657849089282, 11790184577738583171520872861412518665678211592275841109096962, ...} A059919${\displaystyle \scriptstyle (n+1,\,n\,\geq \,0)\,}$
10 {11, 101, 10001, 100000001, 10000000000000001, 100000000000000000000000000000001, 10000000000000000000000000000000000000000000000000000000000000001, ...} A080176${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
11 {12, 122, 14642, 214358882, 45949729863572162, 2111377674535255285545615254209922, 4457915684525902395869512133369841539490161434991526715513934826242, ...} A199592${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
12 {13, 145, 20737, 429981697, 184884258895036417, 34182189187166852111368841966125057, 1168422057627266461843148138873451659428421700563161428957815831003137, ...} A152585${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
13 {14, 170, 28562, 815730722, 665416609183179842, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
14 {15, 197, 38417, 1475789057, 2177953337809371137, 4743480741674980702700443299789930497, 22500609546641425009067997918450033531906583365663182830821882796510806017, ...} A152587${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
15 {16, 226, 50626, 2562890626, 6568408355712890626, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
16 {17, 257, 65537, 4294967297, 18446744073709551617, 340282366920938463463374607431768211457, 115792089237316195423570985008687907853269984665640564039457584007913129639937, ...} A000215${\displaystyle \scriptstyle (n+2,\,n\,\geq \,0)\,}$

### Formulae for a^(2^n) + 1

${\displaystyle {\rm {F}}_{n}(a)=a^{2^{n}}+1=2+\sum _{\nu =1}^{\infty }{\binom {2^{n}}{\nu }}(a-1)^{\nu }\,}$

### Generalized Fermat primes a^(2^n) + 1

Generalized Fermat numbers (Ribenboim (1996))

${\displaystyle {\rm {F}}_{n}(a)\equiv {\rm {F}}_{n}(a,1)=a^{2^{n}}+1,\quad a\geq 2,\,n\geq 0,\,}$

can't be prime if ${\displaystyle \scriptstyle a\,}$ is odd.

Generalized Fermat primes

${\displaystyle {\rm {F}}_{n}(a)\equiv {\rm {F}}_{n}(a,1)=a^{2^{n}}+1,\,{\rm {F}}_{n}(a){\rm {~prime}},\,a\geq 2,\ n\geq 1,\,}$

are congruent to 1 (mod 4).

Because of the ease of proving their primality, generalized Fermat primes have become in recent years a hot topic for research within the field of number theory. Many of the largest known primes[1] today are generalized Fermat primes.

By analogy with the heuristic argument for the finite number of primes among the base-2 Fermat numbers, it is to be expected that there will be only finitely many generalized Fermat primes for each even base. The smallest prime number ${\displaystyle \scriptstyle F_{n}(a)\,}$ with ${\displaystyle \scriptstyle n\,>\,4\,}$ is ${\displaystyle \scriptstyle F_{5}(30)\,=\,30^{2^{5}}+1\,}$.

A more elaborate theory can be used to predict the number of bases for which ${\displaystyle \scriptstyle F_{n}(a),\,a\,\geq \,2,\,}$ will be prime for a fixed ${\displaystyle \scriptstyle n\,}$. The number of generalized Fermat primes can be roughly expected to halve as ${\displaystyle \scriptstyle n\,}$ is increased by 1.

Generalized Fermat primes a^(2^n) + 1
${\displaystyle a\,}$ ${\displaystyle \scriptstyle {\rm {F}}_{n}(a)\,=\,a^{2^{n}}+1,\,{\rm {F}}_{n}(a){\rm {~prime}},\,a\,\geq \,2,\ n\,\geq \,0,\,}$ sequences A-number
2 {3, 5, 17, 257, 65537, ?} A019434${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
4 {5, 17, 257, 65537, ?} A019434${\displaystyle \scriptstyle (n+1,\,n\,\geq \,0)\,}$
6 {7, 37, 1297, ?} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
8 (none) A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
10 {11, 101, ?} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
12 {13, ?} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
14 {197, ?} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
16 {17, 257, 65537, ?} A019434${\displaystyle \scriptstyle (n+2,\,n\,\geq \,0)\,}$
18 {19, ?} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
20 {401, ?} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
22 {23, ?} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
24 {577, ?} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$

(...)

## Generalized Fermat numbers a^(2^n) + b^(2^n)

Generalized Fermat numbers a^(2^n) + b^(2^n)
${\displaystyle a+b\,}$ ${\displaystyle a\,}$ ${\displaystyle b\,}$ ${\displaystyle \scriptstyle {\rm {F}}_{n}(a,b)\,=\,a^{2^{n}}+b^{2^{n}},\,a\,\geq \,2,\,1\,\leq \,b\,\leq \,a-1,\ n\,\geq \,0,\,}$ sequences A-number
3 2 1 {3, 5, 17, 257, 65537, 4294967297, 18446744073709551617, 340282366920938463463374607431768211457, 115792089237316195423570985008687907853269984665640564039457584007913129639937, ...} A000215${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
4 3 1 {4, 10, 82, 6562, 43046722, 1853020188851842, 3433683820292512484657849089282, 11790184577738583171520872861412518665678211592275841109096962, ...} A059919${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
5 3 2 {5, 13, 97, 6817, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
5 4 1 {5, 17, 257, 65537, 4294967297, 18446744073709551617, ...} A000215${\displaystyle \scriptstyle (n+1,\,n\,\geq \,0)\,}$
6 4 2 {6, 20, 272, 65792, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
6 5 1 {6, 26, 626, 390626, 152587890626, 23283064365386962890626, 542101086242752217003726400434970855712890626, ...} A199591${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
7 4 3 {7, 25, 337, 72097, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
7 5 2 {7, 29, 641, 390881, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
7 6 1 {7, 37, 1297, 1679617, 2821109907457, 7958661109946400884391937, 63340286662973277706162286946811886609896461828097, ...} A080174${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
8 5 3 {8, 34, 706, 397186, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
8 6 2 {8, 40, 1312, 1679872, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
8 7 1 {8, 50, 2402, 5764802, 33232930569602, 1104427674243920646305299202, 1219760487635835700138573862562971820755615294131238402, ...} A078304${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
9 5 4 {9, 41, 881, 456161, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
9 6 3 {9, 45, 1377, 1686177, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
9 7 2 {9, 53, 2417, 5765057, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
9 8 1 {9, 65, 4097, 16777217, 281474976710657, 79228162514264337593543950337, 6277101735386680763835789423207666416102355444464034512897, ...} A152581${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
10 6 4 {10, 52, 1552, 1745152, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
10 7 3 {10, 58, 2482, 5771362, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
10 8 2 {10, 68, 4112, 16777472, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
10 9 1 {10, 82, 6562, 43046722, 1853020188851842, 3433683820292512484657849089282, 11790184577738583171520872861412518665678211592275841109096962, ...} A059919${\displaystyle \scriptstyle (n+1,\,n\,\geq \,0)\,}$
11 6 5 {11, 61, 1921, 2070241, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
11 7 4 {11, 65, 2657, 5830337, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
11 8 3 {11, 73, 4177, 16783777, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
11 9 2 {11, 85, 6577, 43046977, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
11 10 1 {11, 101, 10001, 100000001, 10000000000000001, 100000000000000000000000000000001, 10000000000000000000000000000000000000000000000000000000000000001, ...} A080176${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
12 7 5 {12, 74, 3026, 6155426, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
12 8 4 {12, 80, 4352, 16842752, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
12 9 3 {12, 90, 6642, 43053282, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
12 10 2 {12, 104, 10016, 100000256, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
12 11 1 {12, 122, 14642, 214358882, 45949729863572162, 2111377674535255285545615254209922, 4457915684525902395869512133369841539490161434991526715513934826242, ...} A199592${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
13 7 6 {13, 85, 3697, 7444417, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
13 8 5 {13, 89, 4721, 17167841, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
13 9 4 {13, 97, 6817, 43112257, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
13 10 3 {13, 109, 10081, 100006561, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
13 11 2 {13, 125, 14657, 214359137, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
13 12 1 {13, 145, 20737, 429981697, 184884258895036417, 34182189187166852111368841966125057, 1168422057627266461843148138873451659428421700563161428957815831003137, ...} A152585${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
14 8 6 {14, 100, 5392, 18456832, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
14 9 5 {14, 106, 7186, 43437346, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
14 10 4 {14, 116, 10256, 100065536, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
14 11 3 {14, 130, 14722, 214365442, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
14 12 2 {14, 148, 20752, 429981952, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
14 13 1 {14, 170, 28562, 815730722, 665416609183179842, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
15 8 7 {15, 113, 6497, 22542017, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
15 9 6 {15, 117, 7857, 44726337, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
15 10 5 {15, 125, 10625, 100390625, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
15 11 4 {15, 137, 14897, 214424417, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
15 12 3 {15, 153, 20817, 429988257, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
15 13 2 {15, 173, 28577, 815730977, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
15 14 1 {15, 197, 38417, 1475789057, 2177953337809371137, 4743480741674980702700443299789930497, 22500609546641425009067997918450033531906583365663182830821882796510806017, ...} A152587${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
16 9 7 {16, 130, 8962, 48811522, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
16 10 6 {16, 136, 11296, 101679616, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
16 11 5 {16, 146, 15266, 214749506, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
16 12 4 {16, 160, 20992, 430047232, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
16 13 3 {16, 178, 28642, 815737282, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
16 14 2 {16, 200, 38432, 1475789312, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
16 15 1 {16, 226, 50626, 2562890626, 6568408355712890626, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
17 9 8 {17, 145, 10657, 59823937, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
17 10 7 {17, 149, 12401, 105764801, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
17 11 6 {17, 157, 15937, 216038497, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
17 12 5 {17, 169, 21361, 430372321, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
17 13 4 {17, 185, 28817, 815796257, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
17 14 3 {17, 205, 38497, 1475795617, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
17 15 2 {17, 229, 50641, 2562890881, ...} A??????${\displaystyle \scriptstyle (n,\,n\,\geq \,0)\,}$
17 16 1 {17, 257, 65537, 4294967297, 18446744073709551617, ...} A000215${\displaystyle \scriptstyle (n+2,\,n\,\geq \,0)\,}$

(...)

### Generalized Fermat numbers a^(2^n) + b^(2^n) factorization

All factors of generalized Fermat numbers[2] (Riesel (1994))

${\displaystyle {\rm {F}}_{n}(a,b)\equiv a^{2^{n}}+b^{2^{n}},\quad a\geq 2,\,n\geq 0,\,}$

are of the form

${\displaystyle k\cdot 2^{m}+1,\quad k\geq 1,\,m\geq 0.\,}$