login
A257704
Number of steps from n to 0 using this algorithm: x -> floor(Pi*x) if x is odd, and x -> floor(x/Pi) if x is even.
2
6, 1, 5, 7, 17, 7, 13, 2, 4, 6, 8, 6, 8, 8, 16, 18, 22, 18, 30, 8, 12, 14, 16, 14, 16, 3, 5, 3, 21, 5, 9, 7, 13, 7, 11, 9, 11, 7, 9, 7, 9, 9, 13, 9, 13, 9, 15, 17, 21, 17, 19, 19, 21, 23, 25, 23, 27, 19, 29, 31, 35, 31, 35, 9, 11, 13, 15, 13, 15, 15, 19, 15
OFFSET
1,1
LINKS
EXAMPLE
3 -> 9 -> 28 -> 8 -> 2 -> 0, a total of 5 steps, so a(3) = 5.
MATHEMATICA
r = Pi; 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 07 2015
STATUS
approved