OFFSET
1,2
COMMENTS
Sequence contains all Fermat numbers > 3.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..3344
FORMULA
For n > 1, a(n) = 2^(2^n mod n) + 1 = A112987(n) + 1.
MATHEMATICA
Prepend[1 + 2^Array[PowerMod[2, #, #] &, 85, 2], 0] (* Michael De Vlieger, Nov 13 2018, after Vincenzo Librandi at A112987 *)
PROG
(PARI) apply( A321577(n)=if(n>1, 2^lift(Mod(2, n+!n)^n)+1), [0..50]) \\ M. F. Hasler, Nov 19 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Nov 13 2018
STATUS
approved