OFFSET
1,5
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
FORMULA
a(n) = [Sum_{i=1..n} (n mod i)] mod n.
MATHEMATICA
Table[Mod[Sum[Mod[n, i], {i, n}], n], {n, 100}] (* Harvey P. Dale, Jul 10 2024 *)
PROG
(PARI) A294885(n) = (sum(k=2, n, n%k)%n);
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 13 2017
STATUS
approved