OFFSET
0,10
COMMENTS
All the numbers are divisible by 9.
EXAMPLE
a(17) = 72 because 89 is the smallest number having digit sum 17 and 17+ 72=89.
MATHEMATICA
a[n_] := Module[{k}, k=0; While[Not[Plus@@IntegerDigits[n + k] == n], k = k + 9]; k]; Table[a[n], {n, 1, 50}]
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Jul 09 2007
EXTENSIONS
Edited by Stefan Steinerberger, Jul 14 2007
STATUS
approved