OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..1000
MATHEMATICA
Table[Module[{t=10^n}, While[Total[IntegerDigits[t]]!=n+1, t++]; t], {n, 0, 20}] (* or *) Join[{1}, 10^Range[63]+Flatten[Table[(k+1) 10^n-1, {n, 0, 6}, {k, 9}]]] (* Harvey P. Dale, Mar 31 2024 *)
PROG
(PARI) a(n) = my(k=10^(n-1)); while (sumdigits(k) != n, k++); k; \\ Michel Marcus, Aug 16 2023
(Python)
def a(n): m=(n-1)//9; return int("1"+"0"*(n-m-2)+str((n-1)%9)*(n>1)+"9"*m)
print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Aug 16 2023
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Roland Kneer, Aug 14 2023
STATUS
approved