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 A072340 #20 Jan 27 2019 04:36:55 %S A072340 0,2,6,0,1,1,0,5,2,0,3,2,0,1,1,0,2,4,0,3,4,0,1,1,0,22,7,0,2,5,0,1,1,0, %T A072340 7,2,0,4,2,0,1,1,0,2,5,0,13,9,0,1,1,0,3,3,0,2,3,0,1,1,0,3,2,0,5,2,0,1, %U A072340 1,0,2,3,0,8,3,0,1,1,0,5,4,0,2,4,0,1,1,0,14,2,0,3,2,0,1,1,0,2,9,0,3,9,0,1,1 %N A072340 Number of steps to reach an integer starting with n/3 and iterating the map x -> x*ceiling(x), or -1 if no integer is ever reached. %C A072340 We conjecture that an integer is always reached. %C A072340 The occurrence of the first 1, 2, 3, 4 etc. is at the indices 7, 4, 13, 20, 10, 5, 29, 76, 50, 452, 244, 830, 49, 91, 319, 2639, 5753, 2215, 6151, 7148, 280, 28, 1783 - _R. J. Mathar_, Nov 25 2006 %D A072340 N. J. A. Sloane, Seven Staggering Sequences, in Homage to a Pied Puzzler, E. Pegg Jr., A. H. Schoen and T. Rodgers (editors), A. K. Peters, Wellesley, MA, 2009, pp. 93-110. %H A072340 R. J. Mathar, <a href="/A072340/b072340.txt">Table of n, a(n) for n = 3..7147</a> %H A072340 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. %H A072340 N. J. A. Sloane, <a href="http://neilsloane.com/doc/g4g7.pdf">Seven Staggering Sequences</a>. %p A072340 g := proc(x) local M,t1,t2,t3; M := 3^100; t1 := ceil(x) mod M; t2 := x*t1; t3 := numer(t2) mod M; t3/denom(t2); end; %p A072340 f := proc(n) local t1,c; global g; if type(n, 'integer') then RETURN(0); fi; t1 := g(n); c := 1; while not type(t1, 'integer') do c := c+1; t1 := g(t1); od; RETURN(c); end; %p A072340 [seq(f(n/3),n=3..120)]; # this gives the correct answer as long as the answer is < 99. %t A072340 a[n_] := Module[{x = n/3, s = 0}, While[!IntegerQ[x], x *= Ceiling[x]; s++]; s]; Table[a[n], {n, 3, 107}] (* _Jean-François Alcover_, Jan 27 2019, from PARI *) %o A072340 (PARI) A072340(n)={ local(x,s) ; x=n/3 ; s=0 ; while( type(x)!="t_INT", x *= ceil(x) ; s++ ; ) ; return(s) ; } { for(n=3,10000, print(n," ",A072340(n)) ; ) ; } \\ _R. J. Mathar_, Nov 25 2006 %Y A072340 Cf. A085276, A085285, A085286, A073524. %K A072340 nonn %O A072340 3,2 %A A072340 _N. J. A. Sloane_ and J. C. Lagarias, Sep 03 2002