login
A294885
a(n) = A004125(n) mod n = [Sum_{i=1..n} (n mod i)] mod n.
1
0, 0, 1, 1, 4, 3, 1, 0, 3, 3, 0, 5, 2, 3, 6, 4, 0, 11, 7, 1, 7, 11, 6, 13, 3, 8, 17, 12, 6, 18, 12, 7, 19, 27, 8, 18, 11, 20, 35, 18, 10, 32, 24, 20, 24, 36, 27, 38, 22, 20, 41, 38, 28, 6, 34, 16, 40, 56, 45, 46, 35, 52, 0, 53, 23, 65, 53, 51, 12, 65, 52, 60, 47, 68, 6, 4, 48, 22, 7, 46, 73, 15, 82, 11, 58, 83, 35, 15, 87, 17, 71, 71
OFFSET
1,5
LINKS
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
Cf. A004125.
Cf. A056550 (positions of zeros).
Sequence in context: A131027 A133475 A242106 * A021236 A136590 A117026
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 13 2017
STATUS
approved