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.
%I A087704 #24 Sep 02 2023 04:35:58 %S A087704 2,1,2,4,1,3,3,1,9,2,1,2,4,1,8,5,1,3,2,1,2,3,1,9,7,1,4,2,1,2,5,1,3,3, %T A087704 1,4,2,1,2,8,1,6,4,1,3,2,1,2,3,1,5,4,1,6,2,1,2,7,1,3,3,1,6,2,1,2,7,1, %U A087704 4,5,1,3,2,1,2,3,1,4,7,1,10,2,1,2,4,1,3,3,1,5,2,1,2,4,1,8,6,1,3 %N A087704 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. %C A087704 It is conjectured that an integer is always reached. %H A087704 Robert Israel, <a href="/A087704/b087704.txt">Table of n, a(n) for n = 2..10000</a> %H A087704 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. %F A087704 a(n) = a(n + m) if a(n) > 0 and m is a (positive or negative) multiple of 3^a(n). - _Robert Israel_, Sep 01 2023 %p A087704 f2 := proc(x,y) x*floor(y); end; r := 5/3; h := proc(x) local n,y; global r; y := f2(r,x); for n from 1 to 20 do if whattype(y) = 'integer' then RETURN([x,n,y]); else y := f2(r,y); fi; od: RETURN(['NULL','NULL','NULL']); end; [seq(h(n)[2],n=2..60)]; %o A087704 (Python) %o A087704 from fractions import Fraction %o A087704 def A087704(n): %o A087704 x, c = Fraction(n,1), 0 %o A087704 while x.denominator > 1 or x<=n: %o A087704 x = Fraction(5*x.__floor__(),3) %o A087704 c += 1 %o A087704 return c # _Chai Wah Wu_, Sep 01 2023 %Y A087704 Cf. A087705, A087706, A087707. %K A087704 nonn %O A087704 2,1 %A A087704 _N. J. A. Sloane_, Sep 29 2003