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.

A074078 Number of steps to reach an integer starting with s = n/3 and iterating the map x -> s*ceiling(x).

Original entry on oeis.org

0, 2, 4, 0, 1, 1, 0, 13, 2, 0, 3, 2, 0, 1, 1, 0, 2, 4, 0, 8, 5, 0, 1, 1, 0, 7, 9, 0, 2, 7, 0, 1, 1, 0, 3, 2, 0, 6, 2, 0, 1, 1, 0, 2, 3, 0, 10, 3, 0, 1, 1, 0, 3, 3, 0, 2, 3, 0, 1, 1, 0, 5, 2, 0, 5, 2, 0, 1, 1, 0, 2, 10, 0, 3, 7, 0, 1, 1, 0, 8, 4, 0, 2, 6, 0, 1, 1, 0, 5, 2, 0, 3, 2, 0, 1, 1, 0, 2, 5, 0, 4, 6, 0, 1, 1, 0
Offset: 3

Views

Author

N. J. A. Sloane, Sep 16 2002

Keywords

Examples

			s = 5/3 -> 10/3 -> 20/3 -> 35/3 -> 20, so a(5) = 4.
		

Crossrefs

Cf. A072340, A074090, A074091, A074096. Records are in A074097, A074098.
First integer reached: A081852.

Programs

  • Maple
    f := proc(b1,b2) local c1,c2,t1,t2,t3,t4,i; c1 := numer(b1/b2); c2 := denom(b1/b2); i := 0; while c2 <> 1 do i := i+1; t1 := ceil(c1/c2); t2 := b1*t1; t3 := t2/b2; c1 := numer(t3); c2 := denom(t3); od: RETURN(i); end; [seq(f(n,3),n=4..120)];
  • Mathematica
    ce[n_] := Length[NestWhileList[(n/3)*Ceiling[#] &, n/3, ! IntegerQ[#] &]] - 1; Table[ce[n], {n, 3, 108}] (* Jayanta Basu, Jul 30 2013 *)
  • Python
    from math import ceil
    from fractions import Fraction
    def a(n):
        s = Fraction(n, 3)
        x, c = s, 0
        while x.denominator != 1:
            U = ceil(x)
            x, c = U*s, c+1
        return c
    print([a(n) for n in range(3, 109)]) # Michael S. Branicky, Jan 09 2025

A074098 Where records occur in A074078.

Original entry on oeis.org

4, 5, 10, 275, 508, 3694, 5675, 6562, 32420, 137782, 295409, 430645, 13564046, 22289981, 387420490, 3486784402
Offset: 1

Views

Author

N. J. A. Sloane, Sep 17 2002

Keywords

Comments

RECORDS transform of A074078.

Crossrefs

Programs

  • Mathematica
    ce[n_] := Length[NestWhileList[(n/3)*Ceiling[#] &, n/3, ! IntegerQ[#] &]] - 1; t = {}; r = 0; Do[If[ce[n] > r, AppendTo[t, n]; r = ce[n]], {n, 3, 5*10^5}]; t (* Jayanta Basu, Jul 31 2013 *)

Extensions

a(9)-a(12) from Jayanta Basu, Jul 31 2013
a(13)-a(14) from Sean A. Irvine, Jan 09 2025
a(15)-a(16) from Michael S. Branicky, Jan 09 2025
Showing 1-2 of 2 results.