OFFSET
1,2
COMMENTS
n-th value in n-th row of triangular array A069800 in which n-th row consists of numbers (excluding the digit 0) with digit sum n arranged in increasing numerical order.
For n > 376, a(n) has decimal representation xyy...y, where x = (n+1) mod 9 + 1, and among y's exactly two equal 8 and the rest equal 9. For example, a(377) = 1999999998999999999999999999999999989999999. - Max Alekseyev, Aug 20 2013
LINKS
Zak Seidov, Table of n, a(n) for n = 1..70
EXAMPLE
a(1) = 1 because 1 is the 1st number with digital sum 1;
a(2) = 11 because 11 is the 2nd number with digital sum 2 {2,11};
a(3) = 21 because 21 is the 3rd (zerofree positive) number with digital sum 3 {3,12,21,111};
a(4) = 31 because 31 is the 4th (zerofree positive) number with digital sum 4 {4,13,22,31,112,121,211,1111}.
MATHEMATICA
nn=50; c=Table[0, {nn}]; t=c; cnt=0; n=0; While[cnt<nn, n++; If[DigitCount[n, 10, 0]==0, s=Total[IntegerDigits[n]]; If[s<=nn, c[[s]]++; If[c[[s]]==s, t[[s]]=n; cnt++]]]]; t
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Jonathan Vos Post, Jan 25 2011
STATUS
approved