login
A136307
a(n)=n*(10^K) + a(n-1); a(0)=1; K=floor(log_10 a(n-1))+1.
1
1, 11, 211, 3211, 43211, 543211, 6543211, 76543211, 876543211, 9876543211, 109876543211, 11109876543211, 1211109876543211, 131211109876543211, 14131211109876543211, 1514131211109876543211, 161514131211109876543211, 17161514131211109876543211, 1817161514131211109876543211
OFFSET
0,2
MAPLE
A136307 := proc(n)
option remember;
local k ;
if n = 0 then
1;
else
if procname(n-1) < 1 then
k := 0;
else
k := 1+floor(log[10](procname(n-1))) ;
end if ;
procname(n-1)+n*10^k ;
end if;
end proc:
seq(A136307(n), n=0..10) ; # R. J. Mathar, Jun 20 2021
MATHEMATICA
nxt[{n_, a_}]:={n+1, (n+1) 10^(Floor[Log[10, a]]+1)+a}; NestList[nxt, {0, 1}, 20][[All, 2]] (* Harvey P. Dale, Dec 07 2020 *)
PROG
(PARI) a(n) = if (n==0, 1, my(x=a(n-1), K=log(x)\log(10)+1); n*(10^K) + x); \\ Michel Marcus, Mar 16 2022
CROSSREFS
Sequence in context: A069628 A069613 A075858 * A249604 A038399 A053547
KEYWORD
easy,nonn
AUTHOR
Ctibor O. Zizka, Mar 22 2008
EXTENSIONS
Offset corrected by R. J. Mathar, Jun 20 2021
More terms from Michel Marcus, Mar 16 2022
STATUS
approved