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.

Showing 1-3 of 3 results.

A033496 Numbers m that are the largest number in their Collatz (3x+1) trajectory.

Original entry on oeis.org

1, 2, 4, 8, 16, 20, 24, 32, 40, 48, 52, 56, 64, 68, 72, 80, 84, 88, 96, 100, 104, 112, 116, 128, 132, 136, 144, 148, 152, 160, 168, 176, 180, 184, 192, 196, 200, 208, 212, 224, 228, 232, 240, 244, 256, 260, 264, 272, 276, 280, 288, 296, 304, 308, 312, 320, 324
Offset: 1

Views

Author

Keywords

Comments

Or, possible peak values in 3x+1 trajectories: 1,2 and m=16k+4,16k+8,16k but not for all k; those 4k numbers [like m=16k+12 and others] which cannot be such peaks are listed in A087252.
Possible values of A025586(m) in increasing order. See A275109 (number of times each value of a(n) occurs in A025586). - Jaroslav Krizek, Jul 17 2016

Examples

			These peak values occur in 1, 3, 6, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 27, 30, 39, 44, 71, 75, 1579 [3x+1]-iteration trajectories started with different initial values. This list most probably is incomplete.
From _Hartmut F. W. Hoft_, Jun 24 2016: (Start)
Let n be the maximum in some Collatz trajectory and let F(n), the initial fan of n, be the set of all initial values less than or equal to n whose Collatz trajectories lead to n as their maximum. Then the size of F(n) never equals 2, 4, 5, 7 or 10 (see the link).
Conjecture: Every number k > 10 occurs as the size of F(n) for some n.
Fans F(n) of size k, for all 10 < k < 355, exist for 4 <= n <= 50,000,000. The largest fan in this range, F(41163712), has size 7450.
(End)
		

Crossrefs

Cf. A095384 (contains a definition of Collatz[]).

Programs

  • Haskell
    a033496 n = a033496_list !! (n-1)
    a033496_list = 1 : filter f [2, 4 ..] where
       f x = x == maximum (takeWhile (/= 1) $ iterate a006370 x)
    -- Reinhard Zumkeller, Oct 22 2015
    
  • Magma
    Set(Sort([Max([k eq 1 select n else IsOdd(Self(k-1)) and not IsOne(Self(k-1)) select 3*Self(k-1)+1 else Self(k-1) div 2: k in [1..5*n]]): n in [1..2^10] | Max([k eq 1 select n else IsOdd(Self(k-1)) and not IsOne(Self(k-1)) select 3*Self(k-1)+1 else Self(k-1) div 2: k in [1..5*n]]) le 2^10])) // Jaroslav Krizek, Jul 17 2016
    
  • Mathematica
    Collatz[a0_Integer, maxits_:1000] := NestWhileList[If[EvenQ[ # ], #/2, 3# + 1] &, a0, Unequal[ #, 1, -1, -10, -34] &, 1, maxits]; (* Collatz[n] function definition by Eric Weisstein *)
    Select[Range[324], Max[Collatz[#]] == # &] (* T. D. Noe, Feb 28 2013 *)
  • Python
    def a(n):
        if n<2: return [1]
        l=[n, ]
        while True:
            if n%2==0: n//=2
            else: n = 3*n + 1
            if n not in l:
                l.append(n)
                if n<2: break
            else: break
        return l
    print([n for n in range(1, 501) if max(a(n)) == n]) # Indranil Ghosh, Apr 14 2017

Formula

A008908(a(n)) = A159999(a(n)). - Reinhard Zumkeller, May 04 2009
Max(A070165(a(n),k): k=1..A008908(a(n))) = A070165(a(n),1) = a(n). - Reinhard Zumkeller, Oct 22 2015

A087256 Number of different initial values for 3x+1 trajectories in which the largest term appearing in the iteration is 2^n.

Original entry on oeis.org

1, 1, 1, 6, 1, 3, 1, 3, 1, 12, 1, 3, 1, 3, 1, 8, 1, 3, 1, 3, 1, 6, 1, 3, 1, 3, 1, 13, 1, 3, 1, 3, 1, 8, 1, 3, 1, 3, 1, 6, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 11, 1, 3, 1, 3, 1, 6, 1, 3, 1, 3, 1, 21, 1, 3, 1, 3, 1, 8, 1, 3, 1, 3, 1, 6, 1, 3, 1, 3, 1, 78, 1, 3, 1, 3, 1, 8, 1, 3, 1, 3, 1, 6, 1, 3, 1, 3, 1, 9, 1, 3, 1
Offset: 1

Views

Author

Labos Elemer, Sep 08 2003

Keywords

Comments

It would be interesting to know whether the ...1,3,1,3,1,x,1,3,1,3,1,... pattern persists. - John W. Layman, Jun 09 2004
The observed pattern should persist. Proof: [1] a(odd)=1 because -1+2^odd is not divisible by 3, so in Collatz-algorithm 2^odd is preceded by increasing inverse step. Thus 2^odd is the only suitable initial value; [2] a[2k]>=3 for k>1 because 2^(2k)-1=-1+4^k=3A so {b=2^2k, (b-1)/3 and (2a-2)/3} are three relevant initial values. No more case arises unless condition-[3] (see below) was satisfied; [3] a[6k+4]>=5 for k>=1, ..iv=c=2^(6k+4); here {c, (c-1)/3, 2(c-1)/3, (2c-5)/9, (4c-10)/9} is 5 suitable initial values, iff (2c-5)/9 is an integer; e.g. at 6k+4=10, {1024<-341<-682<-227<-454} back-tracking the iteration. - Labos Elemer, Jun 17 2004
From Hartmut F. W. Hoft, Jun 24 2016: (Start)
Except for a(2)=1 the sequence has the 6-element quasiperiod 1, 3, 1, x, 1, 3 where x>=6, but unequal to 7 and 10 (see links below and in A033496). Observe that for n=2^(6k+4)=16*2^(6k), n mod 9 = 7 so that (2n-5)/9 is an integer and a(n)>=6.
Conjecture: All numbers m > 10 occur as values in A087256 (see A233293).
The conjecture has been verified for all 10 < k < 133 for Collatz trajectories with maximum value through 2^(36000*6 + 4). The largest fan of initial values in this range, F(6*1993+4), has maximum 2^11962 and size 3958.
(End)

Examples

			n = 10: 2^10 = 1024 = peak for trajectories started with initial value taken from the list: {151, 201, 227, 302, 341, 402, 454, 604, 682, 804, 908, 1024};
a trajectory with peak=1024: {201, 604, 302, 151, 454, 227, 682, 341, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1}
		

Crossrefs

Programs

  • Mathematica
    c[x_]:=c[x]=(1-Mod[x, 2])*(x/2)+Mod[x, 2]*(3*x+1);c[1]=1; fpl[x_]:=FixedPointList[c, x]; {$RecursionLimit=1000;m=0}; Table[Print[{xm-1, m}];m=0; Do[If[Equal[Max[fpl[n]], 2^xm], m=m+1], {n, 1, 2^xm}], {xm, 1, 30}]
  • PARI
    f(n, m) = 1 + if(2*n <= m, f(2*n, m), 0) + if (n%6 == 4, f(n\3, m), 0);
    a(n) = f(2^n, 2^n); \\ David Wasserman, Apr 18 2005

Formula

a(6n+4) = A105730(n). - David Wasserman, Apr 18 2005

Extensions

Terms a(19)-a(21) from John W. Layman, Jun 09 2004
More terms from David Wasserman, Apr 18 2005

A274467 Numbers that are the largest value in the Collatz (3x+1) trajectories of exactly six initial values.

Original entry on oeis.org

16, 232, 340, 448, 1204, 1636, 1960, 2176, 2500, 2608, 3256, 3472, 3688, 3796, 3904, 4336, 4552, 4768, 5092, 5200, 5416, 5632, 5956, 6064, 6496, 6928, 7252, 7360, 7576, 8116, 8548, 8656, 8872, 8980, 9304, 9412, 9520, 9736, 9952, 10168, 10384, 10600, 10708, 10816, 11032, 11464, 11572, 11680
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 24 2016

Keywords

Comments

Numbers that appear exactly 6 times in A025586, which gives the largest value in the 3x + 1 trajectory of n. This sequence is a subsequence of A033496 and also of A176869.
There is a single Collatz trajectory containing all initial values to its maximum value n which has the form (8n-20)/9, (4n-10)/9, (2n-5)/9, (2n-2)/3, (n-1)/3, n, where n mod 3 = 1, (2n-2)/3 mod 3 = 1, (4n-10)/9 mod 3 = 0; see also the link in A033496.

Examples

			1636 is in the sequence since it is the largest value in the single trajectory starting with 1452, 726, 363, 1090, 545, 1636, and no other initial values produce a trajectory with maximum 1636.
		

Crossrefs

Programs

  • Mathematica
    (* function fanSize[] is defined in A105730 *)
    a274467[low_, high_] := First[Transpose[Select[Map[{#, fanSize[#]}&, Range[low, high, 4]], Last[#]==6&]]]/; Mod[low, 4]==0
    a274467[4,10000] (* Data *)
Showing 1-3 of 3 results.