A259656 Let f(x) be the absolute value of the difference between x and its base-2 reversal. a(n) is the number of times f(x) must be applied starting with n for the result to be 0.
1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 4, 3, 2, 3, 4, 3, 4, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 3, 4, 3, 2, 3
Offset: 1
Crossrefs
Cf. A055945.
Programs
-
Maple
A259656 := proc(n) local f,a ; f := n ; a := 0 ; while f <> 0 do f := abs(A055945(f)) ; a := a+1 ; end do: a; end proc: # R. J. Mathar, Nov 04 2015
Comments