[go: up one dir, main page]

login
A257703
Number of steps from n to 0 using this algorithm: x -> floor(e*x) if x is odd, and x -> floor(x/e) if x is even.
3
2, 1, 3, 3, 11, 2, 8, 2, 4, 4, 8, 4, 10, 12, 14, 12, 14, 3, 7, 9, 13, 3, 5, 3, 7, 5, 9, 5, 7, 9, 11, 9, 17, 5, 9, 11, 13, 11, 13, 13, 19, 15, 17, 13, 15, 13, 25, 15, 23, 4, 6, 8, 10, 8, 14, 10, 12, 14, 16, 4, 8, 4, 8, 6, 8, 4, 6, 8, 12, 8, 10, 6, 8, 10, 20
OFFSET
1,1
LINKS
EXAMPLE
5->13->35->95->258->94->34->12->4->1->2->0, total of 11 steps, so that a(5) = 11.
MATHEMATICA
r = E; 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