OFFSET
1,1
COMMENTS
It is conjectured that an integer is always reached.
LINKS
MAPLE
c2 := proc(x, y) x*ceil(y); end; r := 5/3; ch := proc(x) local n, y; global r; y := c2(r, x); for n from 1 to 20 do if whattype(y) = 'integer' then RETURN([x, n, y]); else y := c2(r, y); fi; od: RETURN(['NULL', 'NULL', 'NULL']); end; [seq(ch(n)[2], n=1..100)];
PROG
(Python)
from fractions import Fraction
def A087707(n):
x, c = Fraction(n), 0
while x.denominator > 1 or x<=n:
x = Fraction(5*x.__ceil__(), 3)
c += 1
return c # Chai Wah Wu, Sep 02 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 29 2003
STATUS
approved