OFFSET
0,2
FORMULA
a(0)=0, a(n) = n*10^len(a(n-1)) + a(n-1), where len(k) = number of digits in k and len(0)=1; = A000422*10.
MAPLE
a:= proc(n) a(n):= `if`(n=0, 0, parse(cat(n, a(n-1)))) end:
seq(a(n), n=0..22); # Alois P. Heinz, Jan 12 2021
MATHEMATICA
nn=20; With[{c=Range[nn, 0, -1]}, Table[FromDigits[Flatten[ IntegerDigits/@ Take[ c, -n]]], {n, nn}]] (* Harvey P. Dale, Feb 01 2013 *)
PROG
(PARI) /* computation by definition: */
a(n)=if(n==0, 0, eval(Str(n, a(n-1)))); \\ Joerg Arndt, Sep 14 2014
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Henry Bottomley, Feb 01 2000
STATUS
approved