OFFSET
1,5
FORMULA
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
Jinyuan Wang, Apr 14 2019
STATUS
approved