OFFSET
1,3
COMMENTS
It is conjectured that an integer is always reached if the initial value is >= 2.
LINKS
Max Alekseyev, Table of n, a(n) for n = 1..10000
MAPLE
A087669 := proc(n) local b, stps ; stps := 0 ; b := (2*n+1)/n ; while not type(b, 'integer') do b := b*floor(b) ; stps := stps+1 ; od ; RETURN(stps) ; end: for n from 1 to 100 do print(n, A087669(n)) ; od ; # R. J. Mathar, Feb 12 2007
PROG
(Python)
def A087669(n):
c, x = 0, 2*n+1
a, b = divmod(x, n)
while b != 0:
x *= a
c += 1
a, b = divmod(x, n)
return c # Chai Wah Wu, Mar 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 27 2003
EXTENSIONS
More terms from R. J. Mathar, Feb 12 2007
Terms a(23) onward from Max Alekseyev, Jun 25 2011
STATUS
approved