

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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS

Clark Kimberling, Table of n, a(n) for n = 1..10000


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

Cf. A257698, A257700A257706.
Sequence in context: A214550 A120903 A180335 * A160535 A258235 A330877
Adjacent sequences: A257696 A257697 A257698 * A257700 A257701 A257702


KEYWORD

nonn,easy


AUTHOR

Clark Kimberling, May 04 2015


STATUS

approved



