%I #9 Apr 10 2021 19:18:09
%S 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,
%T 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,
%U 23,27,19,29,31,35,31,35,9,11,13,15,13,15,15,19,15
%N 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.
%H Clark Kimberling, <a href="/A257704/b257704.txt">Table of n, a(n) for n = 1..10000</a>
%e 3 -> 9 -> 28 -> 8 -> 2 -> 0, a total of 5 steps, so a(3) = 5.
%t r = Pi; f[x_] := If[OddQ[x], Floor[r *x], Floor[x/r]]
%t g[x_] := Drop[FixedPointList[f, x], -1];
%t Table[-1 + Length[g[n]], {n, 1, 200}]
%Y Cf. A257698-A257703.
%K nonn,easy
%O 1,1
%A _Clark Kimberling_, May 07 2015
|