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 A028394 #37 Mar 01 2019 08:04:10 %S A028394 8,11,15,10,13,17,23,31,41,55,73,97,129,86,115,153,102,68,91,121,161, %T A028394 215,287,383,511,681,454,605,807,538,717,478,637,849,566,755,1007, %U A028394 1343,1791,1194,796,1061,1415,1887,1258,1677,1118,1491,994,1325,1767,1178 %N A028394 Iterate the map in A006369 starting at 8. %C A028394 It is an unsolved problem to determine if this sequence is bounded or unbounded. %D A028394 J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010; see page 270. %H A028394 T. D. Noe, <a href="/A028394/b028394.txt">Table of n, a(n) for n = 0..1000</a> %H A028394 J. H. Conway, <a href="http://www.jstor.org/stable/10.4169/amer.math.monthly.120.03.192">On unsettleable arithmetical problems</a>, Amer. Math. Monthly, 120 (2013), 192-198. %H A028394 D. Gale, <a href="http://dx.doi.org/10.1007/978-1-4612-2192-0">Tracking the Automatic Ant And Other Mathematical Explorations</a>, A Collection of Mathematical Entertainments Columns from The Mathematical Intelligencer, Springer, 1998; see p. 16. %H A028394 J. C. Lagarias, <a href="http://www.cecm.sfu.ca/organics/papers/lagarias/paper/html/paper.html">The 3x+1 problem and its generalizations</a>, Amer. Math. Monthly, 92 (1985), 3-23. %H A028394 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %F A028394 The map is: n -> if n mod 3 = 0 then 2*n/3 elif n mod 3 = 1 then (4*n-1)/3 else (4*n+1)/3. %p A028394 G := proc(n) option remember; if n = 0 then 8 elif 4*G(n-1) mod 3 = 0 then 2*G(n-1)/3 else round(4*G(n-1)/3); fi; end; [ seq(G(i),i=0..80) ]; %p A028394 f:=proc(N) local n; %p A028394 if N mod 3 = 0 then 2*(N/3); %p A028394 elif N mod 3 = 2 then 4*((N+1)/3)-1; else %p A028394 4*((N+2)/3)-3; fi; end; # _N. J. A. Sloane_, Feb 04 2011 %t A028394 nxt[n_]:=Module[{m=Mod[n,3]},Which[m==0,(2n)/3,m==1,(4n-1)/3,True,(4n+1)/3]]; NestList[nxt,8,60] (* _Harvey P. Dale_, Dec 13 2013 *) %t A028394 SubstitutionSystem[{n_ :> Switch[Mod[n, 3], 0, 2n/3, 1, (4n-1)/3, _, (4n+1)/3 ] }, {8}, 60] // Flatten (* _Jean-François Alcover_, Mar 01 2019 *) %o A028394 (Haskell) %o A028394 a028394 n = a028394_list !! n %o A028394 a028394_list = iterate a006369 8 -- _Reinhard Zumkeller_, Dec 31 2011 %Y A028394 Cf. A006369, A028396, A094328, A094329, A185589, A185590. %Y A028394 Trajectories under A006368 and A006369: A180853, A217218, A185590, A180864, A028393, A028394, A094328, A094329, A028396, A028395, A217729, A182205, A223083-A223088, A185589, A185590. %K A028394 nonn %O A028394 0,1 %A A028394 _J. H. Conway_