|
|
A215747
|
|
a(n) = (-2)^n mod n.
|
|
3
|
|
|
0, 0, 1, 0, 3, 4, 5, 0, 1, 4, 9, 4, 11, 4, 7, 0, 15, 10, 17, 16, 13, 4, 21, 16, 18, 4, 1, 16, 27, 4, 29, 0, 25, 4, 17, 28, 35, 4, 31, 16, 39, 22, 41, 16, 28, 4, 45, 16, 19, 24, 43, 16, 51, 28, 12, 32, 49, 4, 57, 16, 59, 4, 55, 0, 33, 64, 65, 16, 61, 44, 69, 64, 71, 4, 7
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
n^(n+2) mod (n+2) is essentially the same.
Indices of 0's: 2^k - 1, k>=0.
Indices of 1's: A006521 except the first term.
Indices of 5's: 7, 133, 1517, 11761, ...
|
|
LINKS
|
|
|
EXAMPLE
|
a(5) = (-2)^5 mod 5 = -32 mod 5 = 3.
|
|
MAPLE
|
a:= n-> (-2)&^n mod n:
|
|
PROG
|
(Python)
for n in range(1, 333):
print((-2)**n % n, end=', ')
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|