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 11-19 of 19 results.

A075477 Number of iteration that first becomes smaller than the initial value if Collatz-function (A006370) is iterated, starting with numbers of form 64n+15. Corresponds to selection of every 16th term from A074474.

Original entry on oeis.org

12, 14, 12, 22, 12, 14, 12, 20, 12, 14, 12, 22, 12, 14, 12, 17, 12, 14, 12, 20, 12, 14, 12, 40, 12, 14, 12, 58, 12, 14, 12, 17, 12, 14, 12, 33, 12, 14, 12, 33, 12, 14, 12, 25, 12, 14, 12, 17, 12, 14, 12, 33, 12, 14, 12, 27, 12, 14, 12, 40, 12, 14, 12, 17, 12, 14, 12, 69, 12
Offset: 0

Views

Author

Labos Elemer, Sep 23 2002

Keywords

Comments

Remark that initial values of form 64m+r, if r={3,11,19,27,35,43,51,55} provide first-sink-lengths {7,9,7,9,7,9,7,9} respectively; e.g. {64k+19,192k+58,96k+29,288k+88,144k+44,72k+22,36k+11} submerge first below initial value at the 7th term,36k+11<64k+19.

Examples

			n=0: 64n+15=15,list={15,46,23,70,35,106,53,160,80,40,20,10..}, i.e. the 12th term is the first that <15, the initial value.
		

Crossrefs

Programs

Formula

a(n) = A074473(64n+15), n=0..256. [corrected by Antti Karttunen, Oct 09 2018]

A075480 Number of iteration that first becomes smaller than the initial value if Collatz function (A006370) is iterated, starting with numbers of the form 64n + 39.

Original entry on oeis.org

14, 69, 48, 20, 14, 27, 17, 33, 14, 20, 22, 40, 14, 58, 20, 17, 14, 33, 22, 33, 14, 64, 17, 33, 14, 71, 20, 35, 14, 40, 43, 17, 14, 71, 71, 25, 14, 27, 17, 40, 14, 22, 25, 27, 14, 43, 25, 17, 14, 66, 27, 25, 14, 76, 17, 20, 14, 22, 43, 27, 14, 66, 25, 17, 14, 22
Offset: 0

Views

Author

Labos Elemer, Sep 23 2002

Keywords

Comments

Initial values of the form 64m + r, if r = {3,11,19,27,35,43,51,55}, provide first-sink-lengths {7,9,7,9,7,9,7,9} respectively; e.g., {64k + 19, 192k + 58, 96k + 29, 288k + 88, 144k + 44, 72k + 22, 36k + 11} submerge first below initial value at the 7th term, 36k + 11 < 64k + 19.

Examples

			n=0: 64n + 39 = 39, Collatz trajectory = {39, 118, 59, 178, 89, 268, 134, 67, 202, 101, 304, 152, 76, 38, 19, 58, ....}, i.e., the 14th term = 38 is the first that is less than 39, the initial value, so a(0)=14.
		

Crossrefs

Programs

  • Maple
    col := proc(n) if(n mod 2 = 0)then return n/2: fi: return 3*n+1: end: A075480 := proc(n) local s,v: s:=1: v:=64*n+39: while v>=64*n+39 do v:=col(v): s:=s+1: od: return s: end: seq(A075480(n),n=0..65); # Nathaniel Johnston, Jun 22 2011

Formula

a(n) = A074473(64n+39).

Extensions

Keyword:fini removed by Nathaniel Johnston, Jun 23 2011
Edited by Jon E. Schoenfield, Feb 23 2019

A075478 Number of iteration that first becomes smaller than the initial value if Collatz-function (A006370) is iterated, starting with numbers of form 64n+27. Corresponds to selection of every 16th term from A074474.

Original entry on oeis.org

97, 74, 66, 14, 40, 17, 25, 14, 22, 27, 40, 14, 45, 27, 17, 14, 40, 38, 27, 14, 56, 17, 20, 14, 22, 27, 30, 14, 100, 30, 17, 14, 22, 33, 20, 14, 22, 17, 30, 14, 20, 30, 53, 14, 38, 20, 17, 14, 51, 25, 66, 14, 35, 17, 22, 14, 25, 20, 64, 14, 38, 40, 17, 14, 45, 25, 22, 14, 27
Offset: 0

Views

Author

Labos Elemer, Sep 23 2002

Keywords

Comments

Remark that initial values of form 64m+r, if r={3,11,19,27,35,43,51,55} provide first-sink-lengths {7,9,7,9,7,9,7,9} respectively; e.g. {64k+19,192k+58,96k+29,288k+88,144k+44,72k+22,36k+11} submerge first below initial value at the 7th term,36k+11<64k+19.

Examples

			n=0: 64n+27=27, list={27, 82, 41, 46.23.70, ..}, i.e. the 97th term is the first that <27, the initial value.
		

Crossrefs

Formula

a(n)=A075473[64n+27], n=0, ..., 256

A075479 Number of iteration that first becomes smaller than the initial value if Collatz-function (A006370) is iterated, starting with numbers of form 64n+31. Corresponds to selection of every 16th term from A074474.

Original entry on oeis.org

92, 14, 35, 51, 17, 14, 25, 27, 22, 14, 64, 17, 22, 14, 61, 43, 131, 14, 27, 22, 17, 14, 33, 35, 22, 14, 53, 17, 20, 14, 43, 22, 22, 14, 45, 22, 17, 14, 35, 43, 20, 14, 25, 17, 25, 14, 20, 22, 27, 14, 38, 20, 17, 14, 27, 22, 30, 14, 25, 17, 33, 14, 40, 20, 69, 14, 115, 27, 17
Offset: 0

Views

Author

Labos Elemer, Sep 23 2002

Keywords

Comments

Remark that initial values of form 64m+r, if r={3,11,19,27,35,43,51,55} provide first-sink-lengths {7,9,7,9,7,9,7,9} respectively; e.g. {64k+19,192k+58,96k+29,288k+88,144k+44,72k+22,36k+11} submerge first below initial value at the 7th term,36k+11<64k+19.

Examples

			n=1: 64n+31=95,list={95,286,143,430,215,646,323,970, 485,1456,728,364,182,91,274,...}, i.e. the 14th term=91 is the first that <95, the initial value, so a(1)=14.
		

Crossrefs

Formula

a(n)=A075473[64n+31], n=0, ..., 256

A075481 Number of iteration that first becomes smaller than the initial value if Collatz-function (A006370) is iterated, starting with numbers of form 64n+47. Corresponds to selection of every 16th term from A074474.

Original entry on oeis.org

89, 51, 14, 33, 22, 17, 14, 45, 27, 22, 14, 35, 17, 20, 14, 35, 22, 22, 14, 43, 22, 17, 14, 27, 128, 20, 14, 25, 17, 25, 14, 20, 22, 30, 14, 82, 20, 17, 14, 45, 22, 27, 14, 25, 17, 27, 14, 48, 20, 30, 14, 43, 30, 17, 14, 58, 61, 27, 14, 53, 17, 56, 14, 22, 30, 58, 14, 27, 53
Offset: 0

Views

Author

Labos Elemer, Sep 23 2002

Keywords

Comments

Remark that initial values of form 64m+r, if r={3,11,19,27,35,43,51,55} provide first-sink-lengths {7,9,7,9,7,9,7,9} respectively; e.g. {64k+19,192k+58,96k+29,288k+88,144k+44,72k+22,36k+11} submerge first below initial value at the 7th term,36k+11<64k+19.

Examples

			n=2: 64n+47=175,list={175,526,263,790,395,1186,593,1780, 890,445,1336,668,334,167,502,251....}, i.e. the 14th term=167 is the first that <175, the initial value, so a(2)=14.
		

Crossrefs

Formula

a(n)=A075473[64n+47], n=0, ..., 256

A182137 Size of the set of b for numbers of the form 2^n*x + b that cannot be the smallest element of a set giving a duration of infinite flight in the Collatz problem.

Original entry on oeis.org

1, 3, 6, 13, 28, 56, 115, 237, 474, 960, 1920, 3870, 7825, 15650, 31473, 63422, 126844, 254649, 509298, 1021248, 2050541, 4101082, 8219801, 16490635, 32981270, 66071490, 132455435, 264910870, 530485275, 1060970550, 2123841570, 4253619813, 8507239626, 17027951548, 34095896991, 68191793982, 136471574881, 272943149762, 546144278026, 1093108792776, 2186217585552
Offset: 1

Views

Author

Jérôme STORTI, Apr 14 2012

Keywords

Comments

In the Collatz Problem A014682, it is possible to apply the algorithm to first degree polynomials like 2^n*x+b, where n is an integer and 0 <= b < 2^n. The iteration terminates by two cases:
1) a*x+b where a < 2^n: the polynomial is "minimized"
2) a*x+b where a is odd and a > 2^n, parity cannot be found. The polynomial cannot be minimized.
The sequence counts how many first degree polynomials end like first case for each n > 0.
The interest of this sequence is that every number that can be described by a minimized polynomial cannot be the smallest element of a set of value of T(n) = infinity.

Examples

			Example with 4x+b (0 <= b < 4):
4x is even, thus gives 2x, 2 < 4 (first case).
4x+1, is odd thus 3(4x+1)+1 = 12x+4 is even, thus (12x+4)/2/2=3x+1 3 < 4, first case.
4x+2 is even, (4x+2)/2=2x+1, 2 < 4, first case.
4x+3 with same way gives 9x+8. 9 is odd and 9 > 4, second case.
That explains why the second (n=2) term in sequence is 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{b, p0, p1, minimized = 0}, For[b = 1, b <= 2^n, b++, {p0, p1} = {b, 2^n}; While[Mod[p1, 2] == 0 && p1 >= 2^n, {p0, p1} = If[Mod[p0, 2] == 0, {p0/2, p1/2}, {3*p0+1, 3*p1}]; If[p1<2^n, minimized += 1]]]; minimized]; Table[Print[an = a[n]]; an, {n, 1, 40}] (* Jean-François Alcover, Feb 12 2014, translated from D. S. McNeil's Sage code *)
  • PARI
    upto(P=18)= my(r=Vec([1, 1], P)); forstep(x=3,2^P,4, my(s=x, p=0); until(s<=x, s= if(s%2, 3*s+1, s)/2; if(p++ > P, next(2))); if((2^p>x), r[p]++)); for(i=2, #r, r[i]+= 2*r[i-1]); print(r); \\ Ruud H.G. van Tol, Mar 13 2023
  • Sage
    def A182137(n):
        minimized = 0
        for b in range(2**n):
            p = [b, 2**n]
            while p[1] % 2 == 0 and p[1] >= 2**n:
                p[0],p[1] = [p[0]/2, p[1]/2] if p[0] % 2 == 0 else [3*p[0]+1, 3*p[1]]
            if p[1] < 2**n: minimized += 1
        return minimized # D. S. McNeil, Apr 14 2012
    

Formula

a(n) = 2^n - A076227(n) for n >= 2. - Ruud H.G. van Tol, Mar 13 2023
For n not in A020914, a(n) = 2*a(n-1). - Ruud H.G. van Tol, Apr 12 2023

Extensions

More terms from D. S. McNeil, Apr 14 2012
a(31) from Jérôme STORTI, Apr 22 2012
a(32)-a(38) from Jérôme STORTI, Jul 21 2012
a(39) from Jérôme STORTI, Jul 26 2012
a(40) from Jérôme STORTI, Feb 08 2014
a(37) and a(39) corrected by Jérôme STORTI, Dec 29 2021

A076229 Smallest number such that A076228(a(n)) = n.

Original entry on oeis.org

2, 3, 5, 7, 6, 9, 20, 12, 14, 19, 22, 41, 18, 55, 28, 33, 37, 58, 36, 50, 59, 65, 57, 66, 78, 110, 118, 109, 114, 108, 199, 129, 146, 145, 188, 164, 278, 246, 265, 171, 195, 250, 193, 194, 216, 313, 430, 380, 429, 291, 257, 293, 290, 258, 639, 391, 411, 415, 572
Offset: 1

Views

Author

Labos Elemer, Oct 01 2002

Keywords

Examples

			For n=6, a(6)=9 because first in iteration list starting with 9, i.e. in {9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1}, there are 6 terms below 9: {7, 5, 8, 4, 2, 1}.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := (1-Mod[x,2])*(x/2)+(Mod[x,2])*(3*x+1); f[1]=1;
    f0[x_] := Delete[FixedPointList[f,x],-1]
    f1[x_] := f0[x]-Part[f0[x],1]
    g[x_] := Count[Sign[f1[x]],-1]
    t=Table[0,{256}]; Do[s=g[n]; If[s<257&&t[[s]]==0,t[[s]]=n],{n,1,1000}]; t

Formula

a(n) = Min{x; A076228(x) = n}.

A198724 Let P(n) be the maximal prime divisor of 3*n+1. Then a(n) is the smallest number of iterations of P(n) such that the a(n)-th iteration < n, and a(n) = 0, if such number does not exist.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Oct 29 2011

Keywords

Comments

Question. Is the sequence bounded?
By private communication from Alois P. Heinz, the places of records are 3, 4, 6, 286, 29866 with values 2, 3, 6, 8, 10. No more up to 46000000.

Examples

			For n=52 we have iterations: P^(1)=157, P^(2)=59, P^(3)=89, P^(4)=67, P^(5)=101, P^(6)=19<52. Thus a(52)=6.
		

Crossrefs

Programs

  • Mathematica
    P[n_] := FactorInteger[3*n + 1][[-1, 1]]; Table[k = 1; m = n; While[m = P[m]; m >= n, k++]; k, {n, 3, 100}] (* T. D. Noe, Oct 30 2011 *)
  • PARI
    a(n) = {nb = 1; na = n; while((nna=vecmax(factor(3*na+1)[,1])) >= n,na = nna; nb++); nb;} \\ Michel Marcus, Feb 06 2016

A361733 Length of the Collatz (3x + 1) trajectory from k = 10^n - 1 to a term less than k, or -1 if the trajectory never goes below k.

Original entry on oeis.org

4, 7, 17, 12, 113, 17, 79, 22, 51, 33, 64, 35, 128, 56, 110, 53, 84, 128, 107, 115, 175, 82, 477, 172, 141, 182, 188, 110, 159, 167, 301, 206, 151, 146, 128, 195, 190, 299, 208, 276, 180, 185, 500, 203, 229, 190, 265, 270, 288, 252, 299, 208, 350, 348, 459, 330, 314, 268, 490, 361, 578
Offset: 1

Views

Author

Paul M. Bradley, Mar 22 2023

Keywords

Comments

k = 10^n - 1 = A002283(n) is the repdigit consisting of n digits, all 9s.
The sequence seems to be chaotic but broadly increasing.
By contrast, repdigits of 1, 3, 5, or 7, have constant dropping times after a few initial values each.

Examples

			a(1) = 4 as for k = 9, the Collatz trajectory begins 9, 28, 14, 7, ...;
a(2) = 7 as for k = 99, the Collatz trajectory begins 99, 298, 149, 448, 224, 112, 56, ...;
a(3) = 17 as for k = 999, the Collatz trajectory begins 999, 2998, 1499, 4498, 2249, 6748, 3374, 1687, 5062, 2531, 7594, 3797, 11392, 5696, 2848, 1424, 712, ... .
		

Crossrefs

Programs

  • Mathematica
    collatzLen[a_Integer] := Module[{len = 1, x = a},
      While[x >= a,    If[Mod[x, 2] > 0,
          x = 3 x + 1,
          x = Quotient[x, 2]
        ];
        len++
      ];
      Return[len]
    ]
  • PARI
    f(n) = if (n%2, 3*n+1, n/2); \\ A006370
    b(n) = if (n<3, return(n)); my(m=n, nb=0); while (1, m = f(m); nb++; if (m < n, return(nb+1));); \\ A074473
    a(n) = b(10^n-1); \\ Michel Marcus, Mar 28 2023
  • Python
    def collatz_len(a):
        length = 1
        x = a
        while x >= a:
            if x % 2 > 0:
                x = 3 * x + 1
            else:
                x = x // 2
            length += 1
        return length
    

Formula

a(n) = A074473(10^n-1).
Previous Showing 11-19 of 19 results.