login
A321577
a(n) = F_n mod M_n, where F_n = 2^(2^n) + 1 and M_n = 2^n - 1.
1
0, 2, 5, 2, 5, 17, 5, 2, 257, 17, 5, 17, 5, 17, 257, 2, 5, 1025, 5, 65537, 257, 17, 5, 65537, 129, 17, 67108865, 65537, 5, 17, 5, 2, 257, 17, 262145, 268435457, 5, 17, 257, 65537, 5, 4194305, 5, 65537, 131073, 17, 5, 65537, 1073741825, 16777217, 257, 65537, 5
OFFSET
1,2
COMMENTS
Sequence contains all Fermat numbers > 3.
LINKS
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