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 A087707 #14 Sep 02 2023 16:58:35 %S A087707 5,4,1,3,2,1,2,3,1,10,4,1,6,2,1,2,9,1,3,3,1,5,2,1,2,5,1,4,8,1,3,2,1,2, %T A087707 3,1,4,12,1,5,2,1,2,4,1,3,3,1,7,2,1,2,4,1,5,6,1,3,2,1,2,3,1,11,5,1,4, %U A087707 2,1,2,6,1,3,3,1,4,2,1,2,5,1,6,4,1,3,2,1,2,3,1,6,4,1,5,2,1,2,5,1,3 %N A087707 Number of steps for iteration of map x -> (5/3)*ceiling(x) to reach an integer > n when started at n, or -1 if no such integer is ever reached. %C A087707 It is conjectured that an integer is always reached. %H A087707 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 A087707 c2 := proc(x,y) x*ceil(y); end; r := 5/3; ch := proc(x) local n,y; global r; y := c2(r,x); for n from 1 to 20 do if whattype(y) = 'integer' then RETURN([x,n,y]); else y := c2(r,y); fi; od: RETURN(['NULL','NULL','NULL']); end; [seq(ch(n)[2],n=1..100)]; %o A087707 (Python) %o A087707 from fractions import Fraction %o A087707 def A087707(n): %o A087707 x, c = Fraction(n), 0 %o A087707 while x.denominator > 1 or x<=n: %o A087707 x = Fraction(5*x.__ceil__(),3) %o A087707 c += 1 %o A087707 return c # _Chai Wah Wu_, Sep 02 2023 %Y A087707 Cf. A087704, A087705, A087706, A087708, A087709. %K A087707 nonn %O A087707 1,1 %A A087707 _N. J. A. Sloane_, Sep 29 2003