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.

Showing 1-2 of 2 results.

A257700 Number of steps from n to 1 using this algorithm: x -> floor(r*x) if x is odd, and x -> floor(x/r) if x is even, where r = 5/3.

Original entry on oeis.org

0, 1, 5, 2, 4, 6, 10, 3, 11, 7, 9, 11, 17, 4, 10, 12, 14, 8, 26, 12, 16, 18, 20, 5, 9, 11, 19, 13, 15, 9, 25, 27, 37, 13, 15, 17, 23, 19, 23, 6, 8, 10, 14, 12, 18, 20, 22, 14, 32, 10, 24, 26, 28, 28, 36, 38, 42, 14, 16, 18, 22, 24, 34, 20, 22, 24, 30, 7, 13
Offset: 1

Views

Author

Clark Kimberling, May 04 2015

Keywords

Examples

			5->8->4->2->1, total of 4 steps, so that a(5) = 4.
		

Crossrefs

Programs

  • Mathematica
    r = 5/3; 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}]

A257702 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 = sqrt(5).

Original entry on oeis.org

2, 1, 3, 3, 7, 2, 12, 4, 6, 4, 6, 8, 12, 3, 11, 13, 15, 5, 7, 5, 7, 7, 11, 5, 9, 7, 9, 9, 11, 13, 17, 4, 10, 12, 14, 14, 16, 14, 18, 16, 24, 6, 8, 8, 10, 6, 10, 8, 16, 8, 10, 12, 14, 6, 8, 10, 16, 10, 14, 8, 10, 10, 12, 10, 14, 12, 18, 14, 16, 18, 20, 5, 9
Offset: 1

Views

Author

Clark Kimberling, May 04 2015

Keywords

Examples

			5->11->24->10->4->1->2->0, total of 7 steps, so that a(5) = 7.
		

Crossrefs

Programs

  • Mathematica
    r = Sqrt[5]; 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}]
Showing 1-2 of 2 results.