A213012 Trajectory of 26 under the Reverse and Add! operation carried out in base 2.
26, 37, 78, 135, 360, 405, 744, 837, 1488, 1581, 3024, 3213, 6048, 6237, 12192, 12573, 24384, 24765, 48960, 49725, 97920, 98685, 196224, 197757, 392448, 393981, 785664, 788733, 1571328, 1574397, 3144192, 3150333
Offset: 0
Examples
In binary, 26 is 11010. a(1) = 37 because 11010 + 01011 = 100101, or 37. a(2) = 78 because 100101 + 101001 = 1001110, or 78.
Links
Programs
-
Mathematica
binRA[n_] := If[Reverse[IntegerDigits[n, 2]] == IntegerDigits[n, 2], n, FromDigits[Reverse[IntegerDigits[n, 2]], 2] + n]; NestList[binRA, 26, 100]
Comments