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.

A087708 First integer > n reached under iteration of map x -> (5/3)*ceiling(x) when started at n, or -1 if no such integer is ever reached.

This page as a plain text file.
%I A087708 #11 Sep 02 2023 16:59:00
%S A087708 20,20,5,20,15,10,20,40,15,1770,90,20,290,40,25,45,1770,30,90,95,35,
%T A087708 290,65,40,70,345,45,220,1770,50,145,90,55,95,165,60,290,17845,65,520,
%U A087708 115,70,120,345,75,215,220,80,1770,140,85,145,415,90,715,1215,95,270,165,100,170
%N A087708 First integer > n reached under iteration of map x -> (5/3)*ceiling(x) when started at n, or -1 if no such integer is ever reached.
%C A087708 It is conjectured that an integer is always reached.
%H A087708 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 A087708 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)[3],n=1..100)];
%o A087708 (Python)
%o A087708 from fractions import Fraction
%o A087708 def A087708(n):
%o A087708     x = Fraction(n)
%o A087708     while x.denominator > 1 or x<=n:
%o A087708         x = Fraction(5*x.__ceil__(),3)
%o A087708     return int(x) # _Chai Wah Wu_, Sep 02 2023
%Y A087708 Cf. A087704, A087705, A087706, A087707, A087709.
%K A087708 nonn
%O A087708 1,1
%A A087708 _N. J. A. Sloane_, Sep 29 2003