OFFSET
0,2
COMMENTS
It is infinite, as pointed out by Dr. Geoffrey Landis: Clearly if you have one integer that is N times the sum of its decimal digits, then when you add a 0 to the end, you have an integer that is 10N times the sum of its decimal digits. - Jonathan Vos Post, Feb 06 2011
LINKS
Daniel Mondot, Table of n, a(n) for n = 0..9999
MATHEMATICA
p[n_] := 10(Length[IntegerDigits[n]]+1); a[0]=0; a[n_] := Catch[For[k = p[n]*n, k >= 0, k--, If[k == n*Total[IntegerDigits[k]], If[k == 0, Print["a(", n, ") not found"]]; Throw[k]]]]; Table[a[n], {n, 0, 1000}] (* Jean-François Alcover, Jul 19 2012 updated Oct 06 2016 after Daniel Mondot's observations *)
PROG
(PARI) a(n) = {nbd = 1; while (9*nbd*n > 10^nbd, nbd++); forstep(k=9*nbd*n, 1, -1, if (sumdigits(k)*n == k, return(k)); ); 0; } \\ Michel Marcus, Oct 05 2016
CROSSREFS
KEYWORD
AUTHOR
Henry Bottomley, Mar 16 2000
STATUS
approved