login
A169732
a(1) = 1000; for n>1, a(n) = a(n-1) - digitsum(a(n-1)).
4
1000, 999, 972, 954, 936, 918, 900, 891, 873, 855, 837, 819, 801, 792, 774, 756, 738, 720, 711, 702, 693, 675, 657, 639, 621, 612, 603, 594, 576, 558, 540, 531, 522, 513, 504, 495, 477, 459, 441, 432, 423, 414, 405, 396, 378, 360, 351, 342, 333, 324, 315, 306, 297, 279, 261, 252, 243, 234, 225, 216, 207, 198, 180, 171, 162, 153, 144, 135, 126, 117, 108, 99, 81, 72, 63, 54, 45, 36, 27, 18, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
1,1
MAPLE
f:=proc(n) global S; option remember; if n=1 then RETURN(S) else RETURN(f(n-1)-digsum(f(n-1))); fi; end; S:=1000; [seq(f(n), n=1..120)];
MATHEMATICA
NestList[#-Total[IntegerDigits[#]]&, 1000, 100] (* Harvey P. Dale, Mar 28 2020 *)
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, May 01 2010, based on a suggestion from Chris Cole
STATUS
approved