|
|
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.
|
|
4
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
It is conjectured that an integer is always reached if the initial value is >= 2.
|
|
LINKS
|
J. C. Lagarias and N. J. A. Sloane, Approximate squaring (pdf, ps), Experimental Math., 13 (2004), 113-128.
|
|
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)
c, x = 0, 2*n+1
a, b = divmod(x, n)
while b != 0:
x *= a
c += 1
a, b = divmod(x, n)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|