login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A285741
a(0) = 1; a(2*n) = a(n), a(2*n+1) = a(n) + R(a(n)), where R() is the digit reversal.
0
1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 77, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 77, 4, 8, 8, 16, 8, 16, 16, 77, 8, 16, 16, 77, 16, 77, 77, 154, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 77, 4, 8, 8, 16, 8, 16, 16, 77, 8, 16, 16
OFFSET
0,2
EXAMPLE
a(0) = 1;
a(1) = a(2*0+1) = a(0) + R(a(0)) = 1 + 1 = 2;
a(2) = a(2*1) = a(1) = 2;
a(3) = a(2*1+1) = a(1) + R(a(1)) = 2 + 2 = 4;
a(4) = a(2*2) = a(2) = 2;
a(5) = a(2*2+1) = a(2) + R(a(2)) = 2 + 2 = 4, etc.
MATHEMATICA
a[0] = 0; a[n_] := If[EvenQ[n], a[n/2], a[(n - 1)/2] + FromDigits[Reverse[IntegerDigits[a[(n - 1)/2]]]] ]; Table[a[n], {n, 0, 90}]
CROSSREFS
Cf. A001127 (records), A004086, A056964.
Sequence in context: A054536 A293664 A001316 * A364567 A161831 A096865
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Apr 25 2017
STATUS
approved