A321577 a(n) = F_n mod M_n, where F_n = 2^(2^n) + 1 and M_n = 2^n - 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
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..3344
Programs
-
Mathematica
Prepend[1 + 2^Array[PowerMod[2, #, #] &, 85, 2], 0] (* Michael De Vlieger, Nov 13 2018, after Vincenzo Librandi at A112987 *)
-
PARI
apply( A321577(n)=if(n>1,2^lift(Mod(2, n+!n)^n)+1), [0..50]) \\ M. F. Hasler, Nov 19 2018
Formula
For n > 1, a(n) = 2^(2^n mod n) + 1 = A112987(n) + 1.
Comments