OFFSET
1,10
LINKS
Peter Lomax, Table of n, a(n) for n = 1..1000 (first 90 terms from T. D. Noe)
H. Fredricksen, E. J. Ionascu, F. Luca, and P. Stanica, Minimal Niven numbers, arXiv:0803.0477 [math.NT], 2008.
Peter Lomax, Phix program for generating 1000 terms
FORMULA
a(n) = A002998(n) / n. - Michel Marcus, Dec 10 2012
EXAMPLE
n=23 --> a=73 because 23*73 = 1679 and 1+6+7+9=23.
n=34 --> a=847 because 34*847 = 28798 and 2+8+7+9+8=34.
MAPLE
P:=proc(n) local i, j, k, w; for i from 1 by 1 to n do for j from 1 to n do w:=0; k:=i*j; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; if i=w then print(j); break; fi; od; od; end: P(1000000);
MATHEMATICA
m[n_]:=Module[{m=1}, While[Total[IntegerDigits[m*n]]!=n, m++]; m]; Array[m, 60] (* Harvey P. Dale, Sep 28 2013 *)
PROG
(PARI) a(n)=my(k); while(sumdigits(k+=n)!=n, ); k/n \\ Charles R Greathouse IV, Feb 01 2013
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Jul 09 2007
STATUS
approved