%I #9 Dec 10 2016 18:49:56
%S 1,2,3,4,5,6,7,8,9,18,11,12,13,14,15,16,17,18,19,28,21,22,23,24,25,26,
%T 27,28,29,38,31,32,33,34,35,36,37,38,39,48,41,42,43,44,45,46,47,48,49,
%U 58,51,52,53,54,55,56,57,58,59,68,61,62,63,64,65,66,67,68,69,78,71,72,73,74,75,76,77,78,79,88,81,82,83,84,85,86,87,88,89,98,91,92,93,94,95,96,97,98,99,189
%N Least integer > n having a larger or the same digital sum as n.
%C If n does not end in 9, then a(n) = n + 1, else a(n) is obtained by increasing the last digit of n not equal to 9, and by decreasing the immediately following 9 by 1 (as to get an 8), which is equivalent to adding 9*10^(d-1) where d is the number of trailing 9's in n. In the first case the digital sum of a(n) is 1 more than that of n; in the second case these digital sums are equal.
%F a(n) = n + 1 unless n=9 (mod 10).
%F a(n) = n + 9*10^(valuation(n+1,10)-1) if this valuation (largest power of 10 to divide n+1) is positive.
%F The two cases can be unified as: a(n) = n + ceiling(9*10^(valuation(n+1,10)-1)).
%o (PARI) A199343(n)= n+if(n%10<9,1,9*10^(valuation(n+1,10)-1))
%Y Cf. A199344.
%K nonn,base
%O 0,2
%A _M. F. Hasler_, Nov 07 2011