OFFSET
0,4
COMMENTS
It appears that a(n)=0 for n>39. This has been checked for n<100.
If n has d digits, i.e. 10^(d-1) <= n < 10^d, then k*n <= n^3 has at most 3*d digits, so its sum of digits is at most 27*d. But 27*d < 10^(d-1) if d >= 3. Thus all terms for n >= 100 are 0. - Robert Israel, Mar 20 2016
EXAMPLE
When n = 4, the digit sum of 4*k only equals 4 when k = 1 and k = 10; thus a(4) = 2.
MAPLE
f:= n -> nops(select(t -> convert(convert(n*t, base, 10), `+`)=n, [$0..n^2])):
map(f, [$0..100]); # Robert Israel, Mar 20 2016
PROG
(PARI) a(n) = sum(k=0, n^2, sumdigits(k*n)==n); \\ Michel Marcus, Feb 15 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jordan G. Fischer, Feb 15 2016
STATUS
approved