cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A087669 #26 Mar 01 2021 21:51:42
%S A087669 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,
%T A087669 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,
%U A087669 13,7,83,108,10,16,9,6,3,10,11,15,8,11,6,156,15,38,46,7
%N 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.
%C A087669 It is conjectured that an integer is always reached if the initial value is >= 2.
%H A087669 Max Alekseyev, <a href="/A087669/b087669.txt">Table of n, a(n) for n = 1..10000</a>
%H A087669 J. C. Lagarias and N. J. A. Sloane, Approximate squaring (<a href="http://neilsloane.com/doc/apsq.pdf">pdf</a>, <a href="http://neilsloane.com/doc/apsq.ps">ps</a>), Experimental Math., 13 (2004), 113-128.
%p A087669 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
%o A087669 (Python)
%o A087669 def A087669(n):
%o A087669     c, x = 0, 2*n+1
%o A087669     a, b = divmod(x,n)
%o A087669     while b != 0:
%o A087669         x *= a
%o A087669         c += 1
%o A087669         a, b = divmod(x,n)
%o A087669     return c # _Chai Wah Wu_, Mar 01 2021
%Y A087669 The records and their indices are given by A192230 and A192229.
%Y A087669 Cf. A087670 (integer reached), A087666.
%K A087669 nonn
%O A087669 1,3
%A A087669 _N. J. A. Sloane_, Sep 27 2003
%E A087669 More terms from _R. J. Mathar_, Feb 12 2007
%E A087669 Terms a(23) onward from _Max Alekseyev_, Jun 25 2011