Generalized Fermat Number

Author

Eric W. Weisstein
November 21, 2002

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/GeneralizedFermatNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/GeneralizedFermatNumber.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Enumeration

Table[a^2^n+1,{a,6},{n,0,6}]//ColumnForm

Primes

Select[Table[2^2^n+1,{n,12}],PrimeQ]//Timing

Select[Table[3^2^n+1,{n,20}],PrimeQ]//Timing

Select[Table[4^(2^n)+1,{n,12}],PrimeQ]//Timing

Select[Table[5^2^n+1,{n,20}],PrimeQ]//Timing

Select[Table[6^(2^n)+1,{n,12}],PrimeQ]//Timing

Select[Table[6^(2^n)+1,{n,13,13}],PrimeQ]//Timing