This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A212444 #16 Apr 08 2025 08:44:58 %S A212444 0,1,3,6,13,27,54,108,216,433,867,1734,3469,6939,13878,27756,55512, %T A212444 111025,222050,444101,888202,1776404,3552808,7105617,14211235, %U A212444 28422470,56844941,113689883,227379766,454759532,909519064,1819038129,3638076259,7276152518 %N A212444 Iterates A212439, starting from 0. %H A212444 Amiram Eldar, <a href="/A212444/b212444.txt">Table of n, a(n) for n = 0..1000</a> (terms 0..100 from Reinhard Zumkeller) %H A212444 Benjamin Chaffin, John P. Linderman, N. J. A. Sloane, and Allan R. Wilks, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Sloane/sloane3.html">On Curling Numbers of Integer Sequences</a>, Journal of Integer Sequences, Vol. 16 (2013), Article 13.4.3. %H A212444 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>. %F A212444 a(n+1) = A212439(a(n)) = 2*a(n) + A181935(a(n)) mod 2, a(0) = 0. %F A212444 2*a(n) <= a(n+1) <= 2*a(n) + 1. %t A212444 f[n_, e_] := Module[{d = IntegerDigits[n, 2^e]}, Length[Split[d][[-1]]] - If[SameQ @@ d && Mod[n, 2^e] < 2^(e - 1), 1, 0]]; s[n_] := 2*n + Mod[Max[Table[f[n, e], {e, Range[Max[1, Floor[Log2[n]]]]}]], 2]; s[0] = 1; NestList[s, 0, 33] (* _Amiram Eldar_, Apr 08 2025 *) %o A212444 (Haskell) %o A212444 a212444 n = a212444_list !! n %o A212444 a212444_list = iterate a212439 0 %Y A212444 Cf. A181935, A212439. %K A212444 nonn,base %O A212444 0,3 %A A212444 _Reinhard Zumkeller_, May 17 2012