A087669 The smallest index m such that b(m) is an integer, where b(0)=(2n+1)/n and b(k+1)=b(k)*floor(b(k)) for k>=0.
0, 1, 3, 2, 5, 4, 5, 2, 4, 9, 19, 7, 16, 7, 8, 3, 27, 9, 5, 25, 10, 11, 32, 4, 13, 4, 17, 6, 17, 6, 78, 3, 23, 47, 13, 6, 4, 6, 27, 9, 20, 6, 4, 17, 9, 28, 106, 4, 24, 28, 37, 20, 27, 10, 12, 13, 7, 83, 108, 10, 16, 9, 6, 3, 10, 11, 15, 8, 11, 6, 156, 15, 38, 46, 7
Offset: 1
Keywords
Links
- Max Alekseyev, Table of n, a(n) for n = 1..10000
- J. C. Lagarias and N. J. A. Sloane, Approximate squaring (pdf, ps), Experimental Math., 13 (2004), 113-128.
Crossrefs
Programs
-
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
-
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
Extensions
More terms from R. J. Mathar, Feb 12 2007
Terms a(23) onward from Max Alekseyev, Jun 25 2011
Comments