|
|
A269632
|
|
a(1)=1. At any step consider the terms as two streams of digits: the first read from left to right and the second from right to left. Sum the two numbers and add them as new term of the sequence. Repeat.
|
|
1
|
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
Sum_{k >= 1} a(k)/a(k+1) = 0.567931128577306235186022447895934719336343085...
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|