A212844 a(n) = 2^(n+2) mod n.
0, 0, 2, 0, 3, 4, 1, 0, 5, 6, 8, 4, 8, 2, 2, 0, 8, 4, 8, 4, 11, 16, 8, 16, 3, 16, 23, 8, 8, 16, 8, 0, 32, 16, 2, 4, 8, 16, 32, 24, 8, 4, 8, 20, 23, 16, 8, 16, 22, 46, 32, 12, 8, 4, 7, 16, 32, 16, 8, 4, 8, 16, 32, 0, 63, 58, 8, 64, 32, 36, 8, 40, 8, 16, 47
Offset: 1
Keywords
Examples
a(3) = 2^5 mod 3 = 32 mod 3 = 2.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Maple
A212844 := proc(n) modp( 2&^ (n+2),n) ; end proc: # R. J. Mathar, Jul 24 2012
-
Mathematica
Table[PowerMod[2, n+2, n], {n, 79}] (* Alonso del Arte, Jul 22 2012 *)
-
PARI
A212844(n)=lift(Mod(2,n)^(n+2)) \\ M. F. Hasler, Jul 23 2012
-
Python
for n in range(1,99): print(2**(n+2) % n, end=',')
Formula
a(n) = 2^(n+2) mod n.
Comments