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.

Previous Showing 41-50 of 60 results. Next

A095387 Initial values for 3x+1 trajectories of which the largest term is 9232.

Original entry on oeis.org

27, 31, 41, 47, 54, 55, 62, 63, 71, 73, 82, 83, 91, 94, 95, 97, 103, 107, 108, 109, 110, 111, 121, 124, 125, 126, 129, 137, 142, 143, 145, 146, 147, 155, 159, 161, 164, 165, 166, 167, 171, 175, 182, 183, 188, 189, 190, 193, 194, 195, 199, 206, 207, 214, 215
Offset: 1

Views

Author

Labos Elemer, Jun 14 2004

Keywords

Comments

Altogether 1579 such initial values exist: 27, ..., 9232.

Crossrefs

Cf. A025586.

Programs

  • Mathematica
    c[x_]:=c[x]=(1-Mod[x, 2])*(x/2)+Mod[x, 2]*(3*x+1);c[1]=1; fpl[x_]:=Delete[FixedPointList[c, x], -1] {ta=Table[0, {1580}], u=1}; Do[If[Equal[Max[fpl[n]], 9232], ta[[u]]=n;u=u+1], {n, 1, 9232}];ta

Formula

1579 solutions to A025586(x) = 9232.

A348006 Largest increment in the trajectory from n to 1 in the Collatz map (or 3x+1 problem), or -1 if no such trajectory exists.

Original entry on oeis.org

0, 0, 11, 0, 11, 11, 35, 0, 35, 11, 35, 11, 27, 35, 107, 0, 35, 35, 59, 11, 43, 35, 107, 11, 59, 27, 6155, 35, 59, 107, 6155, 0, 67, 35, 107, 35, 75, 59, 203, 11, 6155, 43, 131, 35, 91, 107, 6155, 11, 99, 59, 155, 27, 107, 6155, 6155, 35, 131, 59, 203, 107
Offset: 1

Views

Author

Paolo Xausa, Oct 02 2021

Keywords

Comments

The largest increment occurs when the trajectory reaches its largest value via a 3x+1 step.
All nonzero terms are odd, since they are of the form 2k+1, for some k >= 5.

Examples

			a(3) = 11 because the trajectory starting at 3 is 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1, and the largest increment (from 5 to 16) is 11.
a(4) = 0 because there are only halving steps in the Collatz trajectory starting at 4.
		

Crossrefs

Programs

  • Mathematica
    nterms=100;Table[c=n;mr=0;While[c>1,If[OddQ[c],mr=Max[mr,2c+1];c=3c+1,c/=2^IntegerExponent[c,2]]];mr,{n,nterms}]
  • PARI
    a(n)=n>>=valuation(n,2); my(r); while(n>1, my(t=2*n+1); n+=t; n>>=valuation(n,2); if(t>r, r=t)); r \\ Charles R Greathouse IV, Oct 25 2022
  • Python
    def A348006(n):
        c, mr = n, 0
        while c > 1:
            if c % 2:
                mr = max(mr, 2*c+1)
                c = 3*c+1
            else:
                c //= 2
        return mr
    print([A348006(n) for n in range(1, 100)])
    

Formula

If n = 2^k (for k >= 0), a(n) = 0; otherwise a(n) = 2*A087232(n)+1 = (2*A025586(n)+1)/3 = A025586(n)-A087232(n).

A350369 a(n) is the length of the longest sequence of consecutive tripling steps in the Collatz (3x+1) sequence beginning at n.

Original entry on oeis.org

0, 0, 2, 0, 1, 2, 3, 0, 3, 1, 2, 2, 1, 3, 4, 0, 1, 3, 2, 1, 1, 2, 3, 2, 2, 1, 6, 3, 2, 4, 6, 0, 2, 1, 2, 3, 3, 2, 3, 1, 6, 1, 3, 2, 1, 3, 6, 2, 3, 2, 2, 1, 1, 6, 6, 3, 3, 2, 2, 4, 3, 6, 6, 0, 3, 2, 2, 1, 1, 2, 6, 3, 6, 3, 2, 2, 2, 3, 4, 1, 3, 6, 6, 1, 1, 3, 3
Offset: 1

Views

Author

Kevin P. Thompson, Dec 27 2021

Keywords

Comments

"Consecutive tripling steps" are repeated (3x+1)/2 operations that are not interrupted by a second division by 2.
This sequence attempts to measure the largest upward thrust in each Collatz sequence and so is correlated to some degree with the maximum value (A025586) and length (A006577) of Collatz sequences.
If n = 2^x * (2^y*z - 1), then a(n) >= y. - Charles R Greathouse IV, Oct 25 2022

Examples

			The Collatz sequence for n=7 has a streak of 3 consecutive tripling steps (at 7, 11, and 17), so a(7) = 3.
7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1
^      ^       ^
		

Crossrefs

Programs

  • PARI
    a(n)=my(c,r); n>>=valuation(n,2); while(n>1, n+=(n+1)/2; if(n%2, c++, r=max(r,c+1); n>>=valuation(n,2); c=0)); max(r,c) \\ Charles R Greathouse IV, Oct 25 2022

A380138 a(n) is the largest value in the '3x+1' trajectory of starting points producing a record number of steps.

Original entry on oeis.org

1, 2, 16, 16, 52, 52, 52, 88, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 250504, 190996, 190996, 250504, 250504, 250504, 481624, 975400, 975400, 497176, 11003416, 11003416, 106358020, 18976192, 41163712, 106358020, 21933016, 104674192, 593279152
Offset: 1

Views

Author

Hugo Pfoertner, Jan 13 2025

Keywords

Crossrefs

Programs

  • Mathematica
    s = Map[ToExpression,
      StringSplit[
        Import["https://oeis.org/A006877/b006877.txt", "Data"][[2 ;; -1]]
      ][[All, -1]] ];
    Map[Max@ NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, #, # > 1 &] &, s] (* Michael De Vlieger, Jan 13 2025 *)

Formula

a(n) = A025586(A006877(n)).

A087262 Integer quotient of largest and initial values in 3x+1 iteration, started at n.

Original entry on oeis.org

1, 1, 5, 1, 3, 2, 7, 1, 5, 1, 4, 1, 3, 3, 10, 1, 3, 2, 4, 1, 3, 2, 6, 1, 3, 1, 341, 1, 3, 5, 297, 1, 3, 1, 4, 1, 3, 2, 7, 1, 225, 1, 4, 1, 3, 3, 196, 1, 3, 1, 4, 1, 3, 170, 167, 1, 3, 1, 5, 2, 3, 148, 146, 1, 3, 1, 4, 1, 3, 2, 130, 1, 126, 1, 4, 1, 3, 3, 10, 1, 3, 112, 111, 1, 3, 2, 6, 1, 3, 1, 101
Offset: 1

Views

Author

Labos Elemer, Sep 11 2003

Keywords

Comments

Remarkably often, several consecutive terms are identical or close, showing closeness of peaks too: at n=107-111, a(n)=83-86.
If a(n)=1, then the peak is the start-value (per A166245).
It is conjectured that if peak/initial value is an integer then it equals 1.

Crossrefs

Cf. A025586, A056959, A166245 (indices of 1's).

Programs

  • Mathematica
    c[x_] := (1-Mod[x, 2])*(x/2)+Mod[x, 2]*(3*x+1)c[1]=1; fpl[x_] := Delete[FixedPointList[c, x], -1] Table[Floor[Max[fpl[w]]/w//N], {w, 1, 256}]

Formula

a(n) = floor(A025586(n)/n).

A087263 a(n) is the least initial value of a 3x+1 trajectory in which n is the largest (peak) term or a(n) = 0 if n cannot be a peak value (i.e., when n = 2k+1, n = 4k+2, n = 16k+12, etc.).

Original entry on oeis.org

1, 2, 0, 4, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 7, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 68, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 84, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 96, 0, 0, 0
Offset: 1

Views

Author

Labos Elemer, Sep 11 2003

Keywords

Crossrefs

Cf. A025586.

Programs

  • Mathematica
    c[x_] := (1-Mod[x, 2])*(x/2)+Mod[x, 2]*(3*x+1); c[1]=1; fpl[x_] := Max[Delete[FixedPointList[c, x], -1]] t=Table[fpl[w], {w, 1, 15000}]; Table[Min[Flatten[Position[t, j]]], {j, 1, 256}]

A087970 Maximal term in Collatz-iteration started at 2^n+1.

Original entry on oeis.org

2, 16, 16, 52, 52, 100, 196, 9232, 9232, 1540, 3076, 9232, 12292, 24580, 49156, 98308, 196612, 393220, 786436, 1572868, 3145732, 6291460, 12582916, 25165828, 50331652, 100663300, 201326596, 402653188, 805306372, 1610612740, 3221225476, 6442450948, 12884901892
Offset: 0

Views

Author

Labos Elemer, Sep 24 2003

Keywords

Crossrefs

Formula

a(n) = A025586(2^n+1).

Extensions

Offset changed to 0, a(0) prepended and more terms added by Amiram Eldar, Jun 04 2024

A087971 Maximal term in Collatz-iteration started at 3^n-1.

Original entry on oeis.org

2, 8, 40, 80, 9232, 9232, 3280, 6560, 29524, 59048, 1276936, 1276936, 6810136, 6810136, 21523360, 43046720, 1570824736, 1570824736, 1743392200, 3486784400, 17651846032, 31381059608, 141214768240, 282429536480, 9161049517720
Offset: 1

Views

Author

Labos Elemer, Sep 24 2003

Keywords

Crossrefs

Formula

a(n) = A025586(3^n-1).

A087973 Maximal term in Collatz-iteration started at 3^n.

Original entry on oeis.org

16, 52, 9232, 244, 9232, 2464, 10528, 19684, 88576, 2270104, 1008916, 1594324, 7174456, 65451076, 64570084, 129140164, 1570824736, 1961316232, 8825923024, 10460353204, 47071589416, 105911076184, 423644304724, 66034034786644
Offset: 1

Views

Author

Labos Elemer, Sep 24 2003

Keywords

Examples

			Compare to A087972, when iv=1+3^n.
		

Crossrefs

Programs

  • Mathematica
    Table[Max[NestList[If[EvenQ[#],#/2,3#+1]&,3^n,100]],{n,25}] (* Harvey P. Dale, Dec 08 2011 *)

Formula

a(n)=A025586[3^n]=A025586[1+3^(n+1)]=A087972[n+1]

A225105 Odd numbers n such that the largest odd term in Collatz(3x+1) trajectory of n is prime.

Original entry on oeis.org

3, 5, 7, 9, 11, 13, 15, 17, 19, 23, 25, 29, 35, 37, 39, 53, 59, 61, 67, 75, 79, 87, 89, 99, 101, 105, 113, 115, 119, 131, 149, 153, 157, 173, 179, 181, 187, 197, 211, 219, 229, 241, 247, 249, 255, 267, 269, 277, 281, 307, 317, 329, 349, 371, 373, 383, 397
Offset: 1

Views

Author

Jayanta Basu, Apr 28 2013

Keywords

Examples

			15 is in the list since highest odd number in Collatz trajectory of 15 is 53, a prime.
		

Crossrefs

Programs

  • Haskell
    a225105 n = a225105_list !! (n-1)
    a225105_list = filter
       ((== 1) . a010051' . maximum . filter odd . a070165_row) a005408_list
    -- Reinhard Zumkeller, Apr 30 2013
  • Mathematica
    Coll[n_]:=NestWhileList[If[EvenQ[#],#/2,3*# + 1] &,n, #>1&];t={};Do[If[PrimeQ[Max[Select[Coll[n],OddQ]]],AppendTo[t,n]],{n,1,300,2}];t
Previous Showing 41-50 of 60 results. Next