login
A259747
a(0) = 1; thereafter a(n) is the concatenation of a(n-1), n, a(n-1).
0
1, 111, 1112111, 111211131112111, 1112111311121114111211131112111, 111211131112111411121113111211151112111311121114111211131112111
OFFSET
0,2
FORMULA
a(1)=1 and a(n) = a(n - 1)*10^(2^n) + n *10^(2^n - 1) + a(n - 1).
MATHEMATICA
concatPal[0] = 1; concatPal[n_] := FromDigits @ Join[RealDigits[concatPal[n - 1]][[1]], {n}, RealDigits[concatPal[n - 1]][[1]]]; Table[concatPal[n], {n, 0, 10}]
nxt[{n_, a_}]:={n+1, FromDigits[Flatten[Join[IntegerDigits[a], IntegerDigits[ n+1], IntegerDigits[ a]]]]}; NestList[nxt, {0, 1}, 5][[All, 2]] (* Harvey P. Dale, Apr 30 2020 *)
PROG
(PARI) main(size) = {s=vector(size); s[1]=1; for(t=2, size, s[t]= eval(Str(s[t-1], t-1, s[t-1]))); return(s); } \\ Anders Hellström, Jul 05 2015
CROSSREFS
Sequence in context: A242645 A262647 A262631 * A176194 A261820 A262661
KEYWORD
nonn,base
AUTHOR
STATUS
approved