OFFSET
0,3
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..1000 (terms 0..100 from Reinhard Zumkeller)
Benjamin Chaffin, John P. Linderman, N. J. A. Sloane, and Allan R. Wilks, On Curling Numbers of Integer Sequences, Journal of Integer Sequences, Vol. 16 (2013), Article 13.4.3.
FORMULA
MATHEMATICA
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 *)
PROG
(Haskell)
a212444 n = a212444_list !! n
a212444_list = iterate a212439 0
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, May 17 2012
STATUS
approved
