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.

A087705 First integer > n reached under iteration of map x -> (5/3)*floor(x) when started at n, or -1 if no such integer is ever reached.

Original entry on oeis.org

5, 5, 10, 35, 10, 30, 35, 15, 905, 30, 20, 35, 105, 25, 905, 210, 30, 85, 55, 35, 60, 105, 40, 2410, 905, 45, 210, 80, 50, 85, 405, 55, 155, 160, 60, 280, 105, 65, 110, 2410, 70, 905, 335, 75, 210, 130, 80, 135, 230, 85, 660, 405, 90, 1160, 155, 95, 160, 2085, 100
Offset: 2

Views

Author

N. J. A. Sloane, Sep 29 2003

Keywords

Comments

It is conjectured that an integer is always reached.

Crossrefs

Programs

  • Maple
    f2 := proc(x,y) x*floor(y); end; r := 5/3; h := proc(x) local n,y; global r; y := f2(r,x); for n from 1 to 20 do if whattype(y) = 'integer' then RETURN([x,n,y]); else y := f2(r,y); fi; od: RETURN(['NULL','NULL','NULL']); end; [seq(h(n)[3],n=2..60)];
  • Python
    from fractions import Fraction
    def A087705(n):
        x = Fraction(n,1)
        while x.denominator > 1 or x<=n:
            x = Fraction(5*x._floor_(),3)
        return int(x) # Chai Wah Wu, Sep 01 2023