OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..1000
MAPLE
a:= n-> (q-> parse(cat([9$q, r, 0$(n-q-1)][])))(iquo(n, 9, 'r')):
seq(a(n), n=1..20); # Alois P. Heinz, Aug 16 2023
PROG
(PARI) a(n) = my(k=10^n-1); while (sumdigits(k) != n, k--); k; \\ Michel Marcus, Aug 16 2023
(Python)
def a(n): return int("9"*(m:=n//9)+str(n%9)+"0"*(n-m-1))
print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Aug 16 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Jan 06 2012
STATUS
approved