OFFSET
3,2
LINKS
Stefano Spezia, Table of n, a(n) for n = 3..10000
MATHEMATICA
Table[Sum[Mod[Total[IntegerDigits[n, i]], i], {i, 2, n-1}], {n, 3, 59}] (* Stefano Spezia, Sep 06 2022 *)
PROG
(PARI) a(n) = sum(b=2, n-1, sumdigits(n, b) % b); \\ Michel Marcus, Sep 06 2022
(Python)
from sympy.ntheory import digits
def a(n): return sum(sum(digits(n, b)[1:])%b for b in range(2, n))
print([a(n) for n in range(3, 60)]) # Michael S. Branicky, Sep 06 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved