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

A225089 a(n) = floor(2^A006666(m)/3^A006667(m)) - m, where m = 2n + 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 0, 2, 0, 1, 2, 1, 2, 1, 0, 1, 4, 3, 1, 0, 3, 2, 4, 4, 2, 5, 5, 4, 3, 5, 0, 6, 3, 2, 8, 7, 6, 8, 2, 7, 0, 10, 6, 5, 4, 7, 8, 10, 9, 8, 4, 3, 10, 9, 11, 14, 9, 12, 7, 6, 10, 9, 0, 14, 13, 12, 7, 6, 5, 10, 17, 13, 15, 0, 13, 12, 16, 15, 5, 8
Offset: 1

Views

Author

Michel Lagneau, Apr 27 2013

Keywords

Comments

A006666 and A006667 are the number of halving and tripling steps to reach 1 in 3x+1 problem.
Properties of this sequence:
a(m) = 0 for m = A211981(m).

Examples

			a(9) = 3 because floor(2^A006666(19)/3^A006667(19)) - 19 = floor(2^14 /3^6) - 19 = floor(22.474622) - 19 = 22 - 19 = 3.
		

Crossrefs

Programs

  • Maple
    A:= proc(n) if type(n, 'even') then n/2; else 3*n+1 ; end if; end proc:
    B:= proc(n) a := 0 ; x := n ; while x > 1 do x := A(x) ; a := a+1 ; end do; a ; end proc:
    C:= proc(n) a := 0 ; x := n ; while x > 1 do if type(x, 'even') then x := x/2 ; else x := 3*x+1 ; a := a+1 ; end if; end do; a ; end proc:
    D:= proc(n) C(n) ; end proc:
    A006666:= proc(n) B(n)- C(n) ; end:
    A006667:= proc(n) C(n)- D(n) ; end:
    G:= proc(n) floor(2^A006666 (n)/3^A006667 (n)) ; end:
    for i from 1 to 100 do: printf(`%d, `, G(i)-i):od:
  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 100; t = {}; n = 0; While[Length[t] < nn, n++; c = Collatz[n]; ev = Length[Select[c, EvenQ]]; od = Length[c] - ev - 1; AppendTo[t, Floor[2^ev/3^od]-n]]; t

A324037 The minimal number of iterations to reach 1 of the modified reduced Collatz function, defined for odd numbers 1 + 2*n in A324036 (assuming the Collatz conjecture).

Original entry on oeis.org

0, 2, 1, 6, 7, 5, 3, 7, 4, 8, 2, 6, 9, 48, 7, 46, 10, 5, 8, 14, 47, 11, 6, 45, 9, 10, 4, 49, 12, 13, 8, 47, 10, 11, 5, 44, 50, 5, 9, 15, 9, 48, 3, 12, 12, 40, 7, 46, 51, 10, 10, 38, 16, 43, 49, 30, 4, 13, 8, 14, 41, 19, 47, 20, 52, 11, 11, 16, 39, 17, 6
Offset: 0

Views

Author

Nicolas Vaillant, Philippe Delarue, Wolfdieter Lang, May 09 2019

Keywords

Comments

The Collatz conjecture is that a(n) is finite. If 1 should never be reached then a(n) = -1.
Compare this sequence with the analogous one A075680(n+1) for the reduced Collatz map of A075677.
a(n) gives also the minimal number of iterations of the Vaillant-Delarue map f, defined in A324245, acting on n to reach 0 (assuming the Collatz conjecture).
For the link to the Vaillant-Delarue paper (where fs is called f_s) see A324036.

Examples

			a(4) = 7 because 1 + 2*4 = 9 and the 7 fs iterations acting on 9 are 7, 11, 17, 13, 3, 5, 1.
Compare this to the reduced Collatz map given in A075677 which needs only 6 = A075680(5) iterations 7, 11, 17, 13, 5, 1. The additional step in the fs case follows 13 == 5 mod(8).
		

Crossrefs

Formula

fs^[a(n)](1 + 2*n) = 1 but fs^[a(n)-1](1 + 2*n) is not 1 (for all n with finite a(n)), where fs is the modified reduced Collatz map defined for 1 + 2*n in A324036(n), for n >= 1, and a(0) = 0.

A351122 Irregular triangle read by rows in which row n lists the number of divisions by 2 after tripling steps in the Collatz 3x+1 trajectory of 2n+1 until it reaches 1.

Original entry on oeis.org

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

Views

Author

Flávio V. Fernandes, Feb 01 2022

Keywords

Examples

			Triangle starts at T(1,0):
   n\k   0   1   2   3   4   5   6   7   8 ...
   1:    1   4
   2:    4
   3:    1   1   2   3   4
   4:    2   1   1   2   3   4
   5:    1   2   3   4
   6:    3   4
   7:    1   1   1   5   4
   8:    2   3   4
   9:    1   3   1   2   3   4
  10:    6
  11:    1   1   5   4
  12:    2   1   3   1   2   3   4
  13:    1   2   1   1   1   1   2   2   1   2   1   1   2  ... (see A372362)
  ...
For n=6, the trajectory of 2*n+1 = 13 is as follows. The tripling steps ("=>") are followed by runs of 3 and then 4 halvings ("->"), so row n=6 is 3, 4.
  13  =>  40 -> 20 -> 10 -> 5  =>  16 -> 8 -> 4 -> 2 -> 1
    triple   \------------/   triple  \---------------/
               3 halvings                4 halvings
Runs of halvings are divisions by 2^T(n,k). Row n=11 is 1, 1, 5, 4 and its steps starting from 2*n+1 = 23 reach 1 by a nested expression
  (((((((23*3+1)/2^1)*3+1)/2^1)*3+1)/2^5)*3+1)/2^4 = 1.
		

Crossrefs

Cf. A075680 (row lengths), A166549 (row sums), A351123 (row partial sums).
Cf. A256598.
Cf. A020988 (where row is [2*n]).
Cf. A198584 (where row length is 2), A228871 (where row is [1, x]).
Cf. A372362 (row 13, the first 41 terms).

Programs

  • PARI
    row(n) = my(m=2*n+1, list=List()); while (m != 1, if (m%2, m = 3*m+1, my(nb = valuation(m,2)); m/=2^nb; listput(list, nb));); Vec(list); \\ Michel Marcus, Jul 18 2022

Formula

T(n,k) = log_2( (3*A256598(n,k)+1) / A256598(n,k+1) ).

Extensions

Corrected by Michel Marcus, Jul 18 2022

A171870 For odd numbers x, a(x) is the number of complex numbers z in the zx + 1 problem giving the same number of iterations as the 3x + 1 problem requires to reach 1.

Original entry on oeis.org

0, 1, 0, 4, 5, 3, 1, 4, 2, 5, 0, 3, 6, 40, 4, 38, 7, 2, 5, 10, 39, 8, 3, 37, 6, 6, 1, 40, 9, 9, 4, 38, 7, 7, 2, 36, 41, 2, 5, 10, 5, 39, 0, 8, 8, 32, 3, 37, 42, 6, 6, 30, 11, 35, 40, 23, 1, 9, 4, 9, 33, 14, 38, 14, 43, 7, 7, 12, 31, 12, 2, 36, 41, 41, 5, 2, 10, 29, 10, 17, 34, 5, 39, 22, 15, 44, 8
Offset: 1

Views

Author

Michel Lagneau, Dec 30 2009, May 18 2010

Keywords

Comments

This sequence appears easy because a(n) = A075680(n) - 1, but its true object is the introduction of polynomials f(z) with interesting properties, for instance the study of the roots of f(z)= 0.
The 3x+1 problem is an exceptional case of the zx + 1 problem (for z real or complex). The sequence gives the number of z <> 3 which gives the same trajectory as the 3x + 1 problem. We associate each number x with a polynomial f(z) whose roots have the same behavior as the integer 3 in the 3x + 1 problem. The sequence gives the degree of each polynomial. Example: with n = 17, the trajectory is (17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1) and we obtain, for z = 3, the following steps:
17;
17z + 1 = 52;
(17z + 1)/4 = 13;
z(17z + 1)/4 + 1 = 40;
(z(17z + 1)/4 + 1)/8 = 5;
z(z(17z + 1)/4 + 1)/8 + 1 = 16;
(z(z(17z + 1)/4 + 1)/8 + 1)/16 = 1 => f(z) = 17z^3 + z^2 + 4z - 480 = (z-3)(17z^2 + 52z + 160)= 0.
The polynomial g(z) = 17z^2 + 52z + 160 of degree 2 is connected with the number 17. The two roots z1 and z2 have the same behavior as the integer 3, and the 3*x + 1 problem, z1*x + 1 problem and z2*x + 1 problem are identical for x = 17. The following polynomials are given for x = 1, 3, 5, ..., 21.
1 -> z-3
3 -> (z-3)*(3z + 10)
5 -> 5*(z-3)
7 -> (z-3)*(7z^4 + 22z^3 + 68z^2 + 208z + 640)
9 -> (z-3)*(9z^5 + 28z^4 + 88z^3 + 272z^2 + 832z + 2560)
11 -> (z-3)*(11z^3 + 34z^2 + 104z + 320)
13 -> (z-3)*(13z + 40)
15 -> (z-3)*(15z^4 + 46z^3 + 140z^2 + 424z + 1280)
17 -> (z-3)*(17z^2 + 52z + 160)
19 -> (z-3)*(19z^5 + 58z^4 + 176z^3 + 544z^2 + 1664z + 5120)
21 -> 21*(z-3)
23 -> (z-3)*(23z^3 + 70z^2 + 212z + 640)
...
In the general case and for each number n, if the Collatz conjecture is true, the polynomial is of the form:
f(z) = (z-3)*g(z) = n*z^p + z^(p-1) + 2^a*z^(n-2) + 2^b*z^(n-3) + ... + 2^w*z + 2^r - 2^s
where
s is the number of divisions by 2 at the last step;
r is the number of divisions by 2 at before the last step;
a is the number of divisions by 2 at the first step;
b is the number of divisions by 2 at the second step.

Examples

			For x=17, a(9)=2 is in the sequence because the associated polynomial of 17 is 17z^2 + 52z + 160 with degree 2.
		

Programs

  • Mathematica
    nextOddK[n_] := Module[{m=3n+1}, While[EvenQ[m], m=m/2]; m]; (* assumes odd n *) Table[m=n; cnt=0; If[n>1, While[m=nextOddK[m]; cnt++; m!=1]]; cnt-1, {n, 1, 200, 2}]

Formula

a(n) = A075680(n) - 1.

Extensions

Partially edited by N. J. A. Sloane, May 22 2010

A224504 a(n) = number of terms in row n of A214850.

Original entry on oeis.org

2, 3, 6, 3, 3, 5, 3, 5, 4, 6, 4, 5, 4, 3, 8, 2, 3, 6, 3, 8, 6, 3, 8, 6, 2, 6, 8, 3, 4, 4, 4, 6, 4, 3, 8, 8, 2, 3, 7, 3, 8, 12, 3, 4, 8, 2, 8, 8, 3, 4, 8, 4, 8, 9, 4, 10, 6, 2, 5, 8, 2, 8, 6, 4, 6, 5, 3, 8, 4, 3, 8, 9, 4, 6, 7, 3, 8, 4, 4, 8, 5, 4, 8, 6, 5, 6
Offset: 1

Views

Author

Michel Lagneau, Apr 08 2013

Keywords

Comments

Number of multiplicative finite groups G(p) with elements {T(2n+1,k)/pZ} where T(2n+1,k) is the reduced trajectory of the Collatz problem whose elements are all odd and p <= A075684(n) + 1.

Examples

			a(18) = 6 because there exist 6 finite groups given by row 18 of A214850 where p = 2, 4, 6, 8, 12 and 18. The Collatz trajectory of the number 2*18 + 1 = 37 with odd numbers is T(37,k) = {37, 7, 11, 17, 13, 5, 1}, and the 6 groups G(p) are:
G(2) = {T(37,k)/2Z} = {1}
G(4) = {T(37,k)/4Z} = {1, 3}
G(6) = {T(37,k)/6Z} = {1, 5}
G(8) = {T(37,k)/8Z}  = {1, 3, 5, 7}
G(12) = {T(37,k)/12Z} = {1, 5, 7, 11}
G(18) = {T(37,k)/18Z} = {1, 5, 7, 11, 13, 17}
G(18) is a cyclic group because the element 5 (or 11) generates the group:
5^1 == 5, 5^2 == 7, 5^3 == 17, 5^4 == 13, 5^5 == 11, 5^6 == 1 (mod 18).
G(8) is not a cyclic group.
a(170) = 32 because there exist 32 finite groups with two elements given by row 170 of A214850 where p = 2, 4, 6, 8, 10, 12, 18, 20, 24, 30, 34, 36, 38, 40, 60, 68, 72, 76, 90, 102, 114, 120, 136, 152, 170, 180, 190, 204, 228, 306, 340, 342. The Collatz trajectory of the number 2*170 + 1 = 341 with odd numbers is T(341,k) = {1, 341}.
		

Crossrefs

A265099 Least k such that floor(2^A006666(k)/3^A006667(k)) - k = n.

Original entry on oeis.org

1, 6, 9, 19, 18, 27, 33, 37, 36, 50, 43, 56, 59, 66, 57, 74, 78, 72, 97, 87, 86, 98, 112, 119, 118, 134, 123, 115, 114, 130, 149, 148, 157, 135, 179, 144, 153, 187, 220, 174, 173, 172, 197, 196, 255, 224, 238, 219, 236, 203, 249, 268, 247, 246, 230, 229, 228
Offset: 0

Views

Author

Michel Lagneau, Dec 01 2015

Keywords

Comments

A006666 and A006667 are the number of halving and tripling steps to reach 1 in 3x+1 problem.
Conjecture: k exists for all n.
In other words, given an integer n, there always exists at least an integer k and a pair of integers (a, b) such that n + k = 2^a/3^b where a is the number of halving steps to reach 1, and b is the number of tripling steps to reach 1, in the 3x+1 problem.

Examples

			a(0) = 1 because A006666(1) = 0 and A006667(1) = 0 => floor(2^0/3^0) - 1 = 1 - 1 = 0;
a(1) = 6 because A006666(6) = 6 and A006667(6) = 2 => floor(2^6/3^2) - 6 = floor(64/9) - 6 = 7 - 6 = 1.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[Collatz[k_]:=NestWhileList[If[EvenQ[#],#/2,3 #+1]&,k,#>1&];nn=500;t={};k=0;While[Length[t]
    				

A271082 Triangle read by rows, the coefficients of the (3x+1)-polynomials.

Original entry on oeis.org

1, -3, 3, 1, -30, 5, -15, 7, 1, 2, 4, 16, -1920, 9, 1, 4, 8, 16, 64, -7680, 11, 1, 2, 8, -960, 13, 1, -120, 15, 1, 2, 4, 8, -3840, 17, 1, 4, -480, 19, 1, 2, 16, 32, 128, -15360, 21, -63, 23, 1, 2, 4, -1920, 25, 1, 4, 8, 64, 128, 512, -61440
Offset: 1

Views

Author

Michel Lagneau, Mar 30 2016

Keywords

Comments

Definition of the (3x+1)-polynomials.
The 3x+1 problem is an exceptional case of the zx + 1 problem (for z real or complex). We associate each odd integer x with a polynomial f(z) whose roots have the same behavior as the integer 3 in the 3x + 1 problem.
The polynomial f(z) is called "(3x+1)-polynomials" and the problem zx + 1 generates the same number of iterations as the 3x + 1 problem requires to reach 1. The polynomial f(z) has interesting properties, for instance the study of the roots of f(z)= 0.
The following example shows the process.
Let’s consider x = 17. The corresponding reduced Collatz trajectory containing only odd numbers (17, 13, 5, 1) is obtained from the following steps:
start with x = 17;
step 1: (3*17 + 1)/4 = 52/4 = 13;
step 2: (3*(3*17 + 1)/4 + 1)/8 = 40/8 = 5;
step 3: (3*(3*(3*17 + 1)/4 + 1)/8 + 1)/16 = 16/16 = 1.
Step 4: substitute the number 3 by the variable z. So, we obtain the following equation:
f(z) = 17z^3 + z^2 + 4z - 480 = (z-3) g(z) = (z-3)(17z^2 + 52z + 160)= 0.
We would consider that the polynomial f(z) is associated with the integer 17.
The three roots are:
z0 = 3;
z1 = -1.529411765 + 2.659448131 I;
z2 = -1.529411765 - 2.659448131 I.
The roots z1 and z2 have the same behavior as the integer z0=3, and the 3*x + 1 problem, z1*x + 1 problem and z2*x + 1 problem are identical for x = 17 : we obtain the same number of iterations of the reduced Collatz function required to yield 1: 17 = 2*9-1 => A075680(9) = 3 iterations.
For example, with z1 we obtain the following steps:
(17*z1 + 1)/4 = -6.250000001 + 11.30265455*I
(z1*(17*z1 + 1)/4 + 1)/8 = -2.437500001 - 4.238495460*I
(z1*(z1*(17*z1 + 1)/4 + 1)/8 + 1)/16 = 1.
For each number x = 2n-1, if the Collatz conjecture is true, the polynomial f(z) is of the general form :
f(z) =(2n-1)*z^p + z^(p-1) + 2^a*z^(n-2) + 2^b*z^(n-3) + ... + 2^w*z + 2^r - 2^s = (z-3) g(z) with the property : degree(f(z)) = p = A075680(n), n>1.
s is the number of divisions by 2 at the last step
r is the number of divisions by 2 at before the last step
a is the number of divisions by 2 at the first step
b is the number of divisions by 2 at the second step

Examples

			Triangle begins:
  1, -3,
  3, 1, -30,
  5, -15,
  7, 1, 2, 4, 16, -1920,
  9, 1, 4, 8, 16, 64, -7680,
  11, 1, 2, 8, -960,
  13, 1, -120,
  15, 1, 2, 4, 8, -3840,
  17, 1, 4, -480,
  19, 1, 2, 16, 32, 128, -15360,
  21, -63,
  23, 1, 2, 4, -1920,
  25, 1, 4, 8, 64, 128, 512, -61440,
The corresponding polynomials are:
+----+-----------------------------------------------------------+
|  x | Polynomials f(z) including the factor (z - 3)             |
+----+-----------------------------------------------------------+
|  1 |  z - 3                                                    |
|  3 |  3z^2 + z - 30                                            |
|  5 |  5z - 15                                                  |
|  7 |  7z^5 + z^4 + 2z^3 + 4z^2 + 16^z - 1920                   |
|  9 |  9z^6 + z^5 + 4z^4 + 8z^3 + 16z^2 + 64z - 7680            |
| 11 |  11z^4 + z^3 + 2z^2 + 8z - 960                            |
| 13 |  13z^2 + z -120                                           |
| 15 |  15z^5 + z^4 + 2z^3 + 4z^2 + 8z  - 3840                   |
| 17 |  17z^3 + z^2 + 4z - 480                                   |
| 19 |  19z^6 + z^5 + 2z^4 + 16z^3 + 32z^2 + 128z - 15360        |
| 21 |  21z - 63                                                 |
| 23 |  23z^4 + z^3 + 2z^2 + 4z - 1920                           |
+----+-----------------------------------------------------------+
+----+-----------------------------------------------------------+
|  x |            Polynomials f(z)/(z - 3)                       |
+----+-----------------------------------------------------------+
|  1 |  1                                                        |
|  3 |  3z + 10                                                  |
|  5 |  5                                                        |
|  7 |  7z^4 + 22z^3 + 68z^2 + 208z +640                         |
|  9 |  9z^5 + 28z^4 + 88z^3 + 272z^2 + 832z + 2560              |
| 11 |  11z^3 + 34z^2 + 104z + 320                               |
| 13 |  13z + 40                                                 |
| 15 |  15z^4 + 46z^3 + 140z^2 + 424z + 1280                     |
| 17 |  17z^2 + 52z + 160                                        |
| 19 |  19z^5 + 58z^4 + 176z^3 + 544z^2 + 1664z + 5120           |
| 21 |  21                                                       |
| 23 |  23z^3 + 70 z^2 + 212z + 640                              |
+----+-----------------------------------------------------------+
		

Crossrefs

Programs

  • Maple
    for m from 1 by 2 to 27 do:    T:=array(1..50,[0$50]):U:=array(1..50,[0$50]):
    n:=m:ii:=2:xx1:=2:pp1:=0:s:=0:U[1]:=n:U[2]:=1:
         for q from 1 to 100  while(xx1<>1)do:
           n1:=3*n+1:
            for p from 1 to 50 do:
             p1:=2^p:x1:=floor(n1/p1):x0:=irem(n1,p1):
              if x0=0 and xx1<> 1
               then
               pp1:=p:xx1:=x1:
               else
              fi:
            od:
             T[ii]:=pp1:n1:=x1:n:=xx1:ii:=ii+1:od:s:=0:
                     for j from 1 to ii-3 do:
                       s:=s+T[j]:U[j+2]:=2^s:
                     od:
                       s:=s+T[ii-2]:s1:=2^s:s:=s+T[ii-1]:
                       s2:=2^s:U[ii]:=s1-s2:
                       W:=array(1..ii-1,[0$ii-1]):
                       W[1]:=U[1]:
                        for l from 2 to ii-1 do:
                         W[l]:=U[l+1]:
                        od:
                        print(m):
                        print(W):
       od:

A349954 a(n) is the number of extrema that result from iterating the reduced Collatz function R(k) = A139391(k) on 2n-1 to yield 1.

Original entry on oeis.org

0, 2, 1, 2, 3, 2, 1, 2, 1, 4, 1, 2, 5, 20, 3, 18, 5, 2, 3, 8, 19, 4, 1, 18, 3, 4, 1, 20, 5, 8, 3, 18, 3, 6, 1, 18, 21, 2, 3, 6, 3, 20, 1, 4, 7, 16, 3, 18, 21, 4, 5, 14, 7, 18, 19, 10, 1, 4, 3, 6, 17, 12, 19, 4, 21, 4, 5, 6, 15, 10, 1, 18, 19, 22, 3, 2, 5, 14
Offset: 1

Views

Author

Ya-Ping Lu, Mar 11 2022

Keywords

Comments

The trajectory starts with a minimum for odd n and with a maximum (see A351974) for even n (>=2). Since the trajectory always stops at 1 (a minimum) assuming the Collatz conjecture holds, a(n) is odd if n is odd and vice versa.

Examples

			a(10) = 4 because 2n+1 = 19 and iterating R on 19 gives 4 extrema:
19 -> 29 -> 11 -> 17 -> 1
      max   min   max   min.
The corresponding path of n, 10 -> 15 -> 6 -> 9 -> 1, is shown in the tree below, where the paths for n up to 100 are given and a(n) is the depth from n to 1.
                                       n                                      a(n)
----------------------------------------------------------------------------- ----
                                                    98     74                  22
                                             37 49 147 65 111                  21
                        14                86  \__\__28_/   42  100             20
                     95 21  55 73 83  97 129        63_____/   225             19
                  54 36  \___\__\__\___\__16        24          48  32 72      18
                   \__\____________________\________81     61  243__/__/       17
                                                     \______\___46  92         16
                                                                69 207         15
                                                                52  78         14
                                                               117__/          13
                                      62                        88             12
                                      93                       297             11
                                      70            94          84  56         10
                                     105  79       141         189__/           9
                                  20  30__/        106         142              8
                                   \__45           159 53      213              7
         68                           34            60 40  90  160  80          6
     29 153    77           85    13  51  17 67 89 135_/___/  1215 405          5
      \__22 50 58 44 66 26  64 96  \__10__/__/__/__/       82  456 304          4
5 19 25  33 75 87 99_/  39 729_/  59  15               47 123 1539__/  31 41    3
\__\__\___\__\__\__4     \___6____/___/   76 38  2   8 18   \___12_____/__/     2
                   \_________9 11 43  71 171 57  3   \__\_______27  91 35 23 7  1
                             \__\__\___\___\__\__\_______________1__/__/__/__/  0
		

Crossrefs

Programs

  • Python
    def R(k): c = 3*k+1; return c//(c&-c)
    def A349954(n):
        if n == 1: return 0
        ct = 1; m = R(2*n-1); d = m - 2*n + 1
        while m > 1:
            if (R(m) - m)*d < 0: ct += 1; d = -d
            m = R(m)
        return ct

A351123 Irregular triangle read by rows: row n lists the partial sums of the number of divisions by 2 after each tripling step in the Collatz trajectory of 2n+1.

Original entry on oeis.org

1, 5, 4, 1, 2, 4, 7, 11, 2, 3, 4, 6, 9, 13, 1, 3, 6, 10, 3, 7, 1, 2, 3, 8, 12, 2, 5, 9, 1, 4, 5, 7, 10, 14, 6, 1, 2, 7, 11, 2, 3, 6, 7, 9, 12, 16, 1, 3, 4, 5, 6, 7, 9, 11, 12, 14, 15, 16, 18, 19, 20, 21, 23, 26, 27, 28, 30, 31, 33, 34, 35, 36, 37, 38, 41, 42, 43, 44, 48, 50, 52, 56, 59, 60, 61, 66, 70
Offset: 1

Views

Author

Flávio V. Fernandes, Feb 01 2022

Keywords

Comments

The terms in row n are T(n,0), T(n,1), ..., T(n, A258145(n)-2), and are the partial sums of the terms in row n of A351122.
In each row n, the terms also satisfy the equation 3* (3* (3* (3* ... (3* (2n+1) +1) + 2^T(n,0)) + 2^T(n,1)) + 2^T(n,2)) + ... = 2^T(n, A258145(n)-2); e.g., for n=4, and A258145(4)-2=5: 3* (3* (3* (3* (3* (3*9+1) +2^2) +2^3) +2^4) +2^6) +2^9 = 2^13.
For row n, the right-hand side of the equation above is 2^A166549(n+1). E.g., for the above example (n=4), the right-hand side is 2^A166549(4+1) = 2^13.

Examples

			Triangle starts at T(1,0):
n\k   0   1   2   3   4   5   6   7   8   9   10 ...
1:    1   5
2:    4
3:    1   2   4   7  11
4:    2   3   4   6   9  13
5:    1   3   6  10
6:    3   7
7:    1   2   3   8   12
8:    2   5   9
...
E.g., row 3 of A351122 is [1, 1, 2, 3, 4]; its partial sums are [1, 2, 4, 7, 11].
		

Crossrefs

Programs

  • PARI
    orow(n) = my(m=2*n+1, list=List()); while (m != 1, if (m%2, m = 3*m+1, my(nb = valuation(m,2)); m/=2^nb; listput(list, nb));); Vec(list); \\ A351122
    row(n) = my(v = orow(n)); vector(#v, k, sum(i=1, k, v[i])); \\ Michel Marcus, Jul 18 2022

Extensions

Data corrected by Mohsen Maesumi, Jul 18 2022
Last row completed by Michel Marcus, Jul 18 2022

A349873 Smallest odd value such that any Collatz trajectory in which it occurs contains exactly n odd values other than '1'.

Original entry on oeis.org

21, 3, 69, 45, 15, 9, 51, 33, 87, 57, 39, 105, 135, 363, 123, 339, 219, 159, 393, 519, 681, 897, 603, 111, 297, 1581, 1053, 351, 933, 621, 207, 549, 183, 243, 645, 429, 285, 189, 63, 165, 27, 147, 195, 129, 171, 231, 609, 411, 543, 1449, 975, 327, 873, 1185, 1527, 1017
Offset: 1

Views

Author

Keywords

Comments

a(n) necessarily is the first odd term in any Collatz trajectory in which it occurs.

Examples

			a(1)=21 as 21 occurs solely in Collatz trajectories starting with 21*2^k, and these trajectories all contain one single odd value other than 1. No value smaller than 21 satisfies these requirements. In particular, a(1) does not equal 5 since 5 is part of Collatz trajectories that contain multiple odd values other than 1 (e.g., ...,13,40,20,10,5,16,8,4,2,1).
a(2)=3 as 3 occurs solely in Collatz trajectories starting with 3*2^k, and these trajectories all contain exactly two odd values other than 1 (namely 3 and 5).
		

Crossrefs

All terms are in A016945.

Programs

  • PARI
    oddsteps(n)={my(s=0); while(n!=1, if(n%2,n=(3*n+1);s++); n/=2); s}
    a(n)={forstep(k=3, oo, 6, if(oddsteps(k)==n, return(k)))} \\ Andrew Howroyd, Dec 19 2021
    
  • PARI
    oddsteps(n)=my(s); while(n>1, n+=n>>1+1; if(!bitand(n,1), n >>= valuation(n,2)); s++); s
    first(n)=my(v=vector(n),r=n,t); forstep(k=3,oo,2, t=oddsteps(k); if(t<=n && v[t]==0, v[t]=k; if(r-- == 0, return(v)))) \\ Charles R Greathouse IV, Dec 22 2021

Formula

a(n) mod 6 = 3 for all n>0. The odd multiples of 3 form the 'Garden-of-Eden' set (terms without a predecessor) under iterations of the reduced Collatz function A075677.
Previous Showing 11-20 of 20 results.