|
|
A307233
|
|
a(n) = Product_{k=1..n} (k^2 + k + 1) mod n.
|
|
0
|
|
|
0, 1, 0, 1, 3, 3, 0, 1, 0, 9, 3, 9, 0, 7, 12, 1, 3, 9, 0, 1, 0, 9, 3, 9, 18, 13, 0, 21, 3, 9, 0, 1, 27, 9, 7, 9, 0, 19, 0, 1, 3, 21, 0, 37, 18, 9, 3, 33, 0, 49, 27, 13, 3, 27, 12, 49, 0, 9, 3, 21, 0, 31, 0, 1, 13, 3, 0, 13, 27, 49, 3, 9, 0, 37, 57, 57, 42
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
LINKS
|
|
|
FORMULA
|
If prime p == 1 mod 3, a(p) = 0; if p == 2 mod 3, a(p) = 3 for prime p > 3.
If a(j) = a(k) = 0, then a(j*k) = 0.
|
|
EXAMPLE
|
a(4) = 1 since 3*7*13*21 = 1 mod 4.
|
|
MATHEMATICA
|
Table[Mod[Product[k^2+k+1, {k, 0, n}], n], {n, 1, 100}]
|
|
PROG
|
(PARI) a(n) = prod(k=1, n, k^2+k+1) % n
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|