login
A096196
a(n) = (1 + 2^n) mod n.
6
0, 1, 0, 1, 3, 5, 3, 1, 0, 5, 3, 5, 3, 5, 9, 1, 3, 11, 3, 17, 9, 5, 3, 17, 8, 5, 0, 17, 3, 5, 3, 1, 9, 5, 19, 29, 3, 5, 9, 17, 3, 23, 3, 17, 18, 5, 3, 17, 31, 25, 9, 17, 3, 29, 44, 33, 9, 5, 3, 17, 3, 5, 9, 1, 33, 65, 3, 17, 9, 45, 3, 65, 3, 5, 69, 17, 19, 65, 3, 17, 0, 5, 3, 65, 33, 5, 9, 81, 3
OFFSET
1,5
LINKS
OEIS Wiki, 2^n mod n
MAPLE
seq(1 + 2 &^ n mod n, n = 1 .. 250); # Robert Israel, Dec 10 2015
MATHEMATICA
Table[Mod[1 + Mod[2, n]^n, n], {n, 89}] (* Michael De Vlieger, Dec 10 2015 *)
PROG
(PARI) a(n)=(1+2^n)%n \\ Anders Hellström, Dec 10 2015
(PARI) a(n)=lift(1+Mod(2, n)^n); \\ Michel Marcus, Dec 12 2015
(Magma) [(1+2^n) mod (n): n in [1..100]]; // Vincenzo Librandi, Dec 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Jul 26 2004
STATUS
approved