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

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

Original entry on oeis.org

12, 84, 12, 14, 12, 35, 12, 14, 12, 17, 12, 14, 12, 25, 12, 14, 12, 25, 12, 14, 12, 27, 12, 14, 12, 17, 12, 14, 12, 38, 12, 14, 12, 25, 12, 14, 12, 45, 12, 14, 12, 17, 12, 14, 12, 27, 12, 14, 12, 20, 12, 14, 12, 79, 12, 14, 12, 17, 12, 14, 12, 20, 12, 14, 12, 33, 12, 14, 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+7=7, list={7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5..}, i.e. the 12th term is the first that <12, the initial value.
		

Crossrefs

Programs

  • Mathematica
    lcoll[n_] := Length[NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # >= n &]]; Table[lcoll[64*i + 7], {i, 0, 68}] (* Jayanta Basu, Jun 15 2013 *)
  • PARI
    A006370(n) = if(n%2, 3*n+1, n/2);
    A074473(n) = if(1==n,n,my(org_n=n); for(i=1,oo,if(nA006370(n)));
    A075476(n) = A074473((64*n)+7); \\ Antti Karttunen, Oct 09 2018

Formula

a(n) = A074473(64n+7), n=0, ..., 256

Extensions

Typo in formula corrected by Antti Karttunen, Oct 09 2018

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]

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

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

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).
Showing 1-7 of 7 results.