OFFSET
1,5
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = (-2)^5 mod 5 = -32 mod 5 = 3.
MAPLE
a:= n-> (-2)&^n mod n:
seq(a(n), n=1..100); # Alois P. Heinz, Apr 08 2015
PROG
(Python)
for n in range(1, 333):
print((-2)**n % n, end=', ')
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Alex Ratushnyak, Aug 23 2012
STATUS
approved