login
A257699
Number of steps from n to 0 using this algorithm: x -> floor(r*x) if x is odd, and x -> floor(x/r) if x is even, where r = 5/2.
3
2, 1, 7, 3, 5, 2, 6, 8, 10, 4, 14, 4, 6, 6, 10, 3, 5, 7, 13, 9, 11, 9, 13, 11, 13, 5, 13, 15, 17, 5, 9, 5, 7, 7, 13, 7, 9, 11, 15, 4, 6, 4, 18, 6, 8, 8, 12, 14, 16, 10, 16, 10, 12, 12, 16, 10, 12, 14, 22, 12, 14, 12, 16, 14, 16, 6, 12, 14, 16, 16, 20, 16, 18
OFFSET
1,1
LINKS
EXAMPLE
5->12->4->1->2->0, total of 5 steps, so that a(5) = 5.
MATHEMATICA
r = 5/2; f[x_] := If[OddQ[x], Floor[r *x], Floor[x/r]]
g[x_] := Drop[FixedPointList[f, x], -1];
Table[-1 + Length[g[n]], {n, 1, 200}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 04 2015
STATUS
approved