cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

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