OFFSET
1,2
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..11
FORMULA
Sum_{k >= 1} a(k)/a(k+1) = 0.567931128577306235186022447895934719336343085...
a(n) == 0 (mod 9), for n>3. - Ivan N. Ianakiev, Mar 08 2016
EXAMPLE
First step: 1; the two numbers are obviously 1 and 1 which sum to 2; sequence becomes 1, 2.
Second step: 1, 2; the two numbers are 12 and 21 that sum to 33; sequence becomes 1, 2, 33.
Third step: 1, 2, 33: the two numbers are 1233 and 3321 that sum to 4554; sequence becomes 1, 2, 33, 4554; etc.
MAPLE
P:=proc(q) local a, b, c, d, k, n; a:=[1]; print(1);
for n from 1 to q do b:=a[1]; for k from 2 to nops(a) do b:=10*b+a[k]; od;
c:=a[nops(a)]; for k from nops(a)-1 by -1 to 1 do c:=10*c+a[k]; od; d:=b+c; print(d);
for k from 1 to ilog10(d)+1 do a:=[op(a), (trunc(d/10^(ilog10(d)+1-k)) mod 10)]; od;
od; print(); end: P(15);
MATHEMATICA
a = {1}; Do[AppendTo[a, FromDigits@ # + FromDigits@ Reverse@ # &@ Flatten@ Map[IntegerDigits, a]], {n, 2, 9}]; a (* Michael De Vlieger, Mar 03 2016 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Mar 02 2016
STATUS
approved