[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
A052489
Largest number that is n times sum of its decimal digits.
11
0, 9, 18, 27, 48, 45, 54, 84, 72, 81, 90, 198, 108, 195, 126, 135, 288, 153, 162, 399, 180, 378, 396, 207, 216, 375, 468, 486, 588, 261, 270, 558, 576, 594, 408, 315, 648, 999, 684, 351, 480, 738, 756, 774, 792, 405, 966, 846, 864, 882, 450, 918, 936, 954
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
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
base,nonn,nice,look
AUTHOR
Henry Bottomley, Mar 16 2000
STATUS
approved