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.

A028393 Iterate the map in A006368 starting at 8.

Original entry on oeis.org

8, 12, 18, 27, 20, 30, 45, 34, 51, 38, 57, 43, 32, 48, 72, 108, 162, 243, 182, 273, 205, 154, 231, 173, 130, 195, 146, 219, 164, 246, 369, 277, 208, 312, 468, 702, 1053, 790, 1185, 889, 667, 500, 750, 1125, 844, 1266, 1899, 1424, 2136, 3204, 4806, 7209, 5407
Offset: 0

Views

Author

Keywords

Comments

It is conjectured that this trajectory never repeats, but no proof of this has been found. - N. J. A. Sloane, Jul 14 2009

References

  • J. H. Conway, Unpredictable iterations, in Proc. Number Theory Conf., Boulder, CO, 1972, pp. 49-52. - N. J. A. Sloane, Oct 04 2012
  • R. K. Guy, Unsolved Problems in Number Theory, E17. - N. J. A. Sloane, Oct 04 2012
  • J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010; see page 5. [From N. J. A. Sloane, Jan 21 2011]

Crossrefs

Programs

  • Haskell
    a028393 n = a028393_list !! n
    a028393_list = iterate a006368 8  -- Reinhard Zumkeller, Apr 18 2012
    
  • Maple
    F := proc(n) option remember; if n = 0 then 8 elif 3*F(n-1) mod 2 = 0 then 3*F(n-1)/2 else round(3*F(n-1)/4); fi; end; [ seq(F(i),i=0..80) ];
  • Mathematica
    f[n_?EvenQ] := 3*n/2; f[n_] := Round[3*n/4]; a[0] = 8; a[n_] := a[n] = f[a[n - 1]]; Table[a[n], {n, 0, 52}]  (* Jean-François Alcover, Jun 10 2013 *)
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def F(n):
        if n == 0: return 8
        elif 3*F(n-1)%2 == 0: return 3*F(n-1)//2
        else: return (3*F(n-1)+1)//4
    print([F(i) for i in range(81)]) # Michael S. Branicky, Aug 12 2021 after J. H. Conway

Formula

a(n+1) = A006368(a(n)).