login

Revision History for A087704

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of steps for iteration of map x -> (5/3)*floor(x) to reach an integer > n when started at n, or -1 if no such integer is ever reached.
(history; published version)
#24 by Michel Marcus at Sat Sep 02 04:35:58 EDT 2023
STATUS

reviewed

approved

#23 by Joerg Arndt at Sat Sep 02 02:21:33 EDT 2023
STATUS

proposed

reviewed

#22 by Chai Wah Wu at Fri Sep 01 22:52:08 EDT 2023
STATUS

editing

proposed

#21 by Chai Wah Wu at Fri Sep 01 22:52:02 EDT 2023
PROG

x = Fraction(5*(x.numerator//x.denominator__floor__(), 3)

STATUS

proposed

editing

#20 by Chai Wah Wu at Fri Sep 01 21:32:29 EDT 2023
STATUS

editing

proposed

#19 by Chai Wah Wu at Fri Sep 01 21:32:24 EDT 2023
PROG

while x<=n or x.denominator > 1 or x<=n:

STATUS

approved

editing

#18 by N. J. A. Sloane at Fri Sep 01 21:17:57 EDT 2023
STATUS

proposed

approved

#17 by Chai Wah Wu at Fri Sep 01 20:22:10 EDT 2023
STATUS

editing

proposed

#16 by Chai Wah Wu at Fri Sep 01 20:21:54 EDT 2023
PROG

return c # Chai Wah Wu, Sep 01 2023

#15 by Chai Wah Wu at Fri Sep 01 20:21:29 EDT 2023
PROG

(Python)

from fractions import Fraction

def A087704(n):

x, c = Fraction(n, 1), 0

while x<=n or x.denominator > 1:

x = Fraction(5*(x.numerator//x.denominator), 3)

c += 1

return c # Chai Wah Wu, Sep 01 2023

STATUS

proposed

editing