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-10 of 14 results. Next

A258145 Row lengths of the irregular array in A256598.

Original entry on oeis.org

1, 3, 2, 6, 7, 5, 3, 6, 4, 7, 2, 5, 8, 42, 6, 40, 9, 4, 7, 12, 41, 10, 5, 39, 8, 8, 3, 42, 11, 11, 6, 40, 9, 9, 4, 38, 43, 4, 7, 12, 7, 41, 2, 10, 10, 34, 5, 39, 44, 8, 8, 32, 13, 37, 42, 25, 3, 11, 6, 11, 35
Offset: 0

Views

Author

Wolfdieter Lang, May 27 2015

Keywords

Comments

a(n) is the number of odd numbers in row A070165(2*n+1) and also in row A070168(2*n+1), for n >= 0 (if it turns out that a row 2*n+1 has infinite row length one puts a(n) = 0).

Crossrefs

A328037 Irregular triangle T(n,k) read by rows: "quotient trajectories" in reduced Collatz sequences; i.e., T(n,k) = q-value(A256598(n,k)) where q-value(z) = (z - A259663(m,j))/2^(m+j) and (m,j) is the unique pair such that z == A259663(m,j) (mod 2^(m+j)). (See Comments for definitions.)

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 2, 0, 0, 0, 1, 5, 0, 0, 2, 6, 20, 15, 5, 17, 3, 9, 29, 2, 8, 24, 74, 27, 5, 15, 47, 17, 53
Offset: 0

Views

Author

Bob Selcoe, Oct 03 2019

Keywords

Comments

Coefficients T(m,j) in the array A259663 are least residues in congruence classes T(m,j) mod 2^(m+j). T"(m,j) denotes all members of that class.
Reduced Collatz sequences (i.e., reduced sequences) are standard Collatz sequences excluding even terms. Row n in triangle A256598 shows the reduced sequence starting with 2n+1.
Let every positive odd number z = T"(m,j)_q, where q is the quotient of z in T"(m,j). For example, T(2,3) = 7 in A259663, so T"(2,3) contains all numbers == 7 (mod 32). So z = T"(2,3)_0 = 7, z = T"(2,3)_1 = 39, z = T"(2,3)_2 = 71, etc.
T(n,k) is the q-value of A256598(n,k) (see Example below). Thus, each row n is defined here as a "quotient trajectory" for the reduced sequence with starting term 2n+1.

Examples

			Triangle starts:
  0;
  0, 0, 0;
  0, 0;
  0, 0, 2, 0, 0, 0;
  1, 0, 0, 2, 0, 0, 0;
  0, 2, 0, 0, 0;
  0, 0, 0;
  0, 0, 0, 0, 0, 0;
  2, 0, 0, 0;
  0, 1, 0, 2, 0, 0, 0;
  0, 0;
  0, 0, 0, 0, 0;
  3, 0, 1, 0, 2, 0, 0, 0;
  ...
n=13 starts with 27 = T"(2,2)_1 and takes 41 steps: 1, 5, 0, 0, 2, 6, 20, 15, 5, ..., 0, 0, 0.
Row n=12 maps to the reduced sequence n=12 in A256598: 25 -> 19 -> 29 -> 11 -> 17 -> 13 -> 5 -> 1, which is T"(2,1)_3 -> T"(3,2)_0 -> T"(3,1)_1 -> T"(2,2)_0 -> T"(2,1)_2 -> T"(3,1)_0 -> T"(4,1)_0 -> T"(2,1)_0.
		

Crossrefs

Programs

  • PARI
    Tdt(n, k) = if (n==2, if (k%2, 2^k-1, 3*2^k-1), if (n==3, if (k%2, 7*2^k-1, 5*2^k-1), mj = 2^(n-3) % 2^(n-2); mk = k % 2^(n-2); (2^k*3^(mj-mk) - 1) % 2^(n+k))); \\ A259663
    qvalue(m) = {my(line = 2, i, md); while (1, i = line; for (j=1, line-1, md = Tdt(i, j); if (m % (2^(i+j)) == md % (2^(i+j)), return((m-md)/2^(i+j))); i--;); line ++;);}
    row(n) = {my(oddn = 2*n+1, vl = List(oddn), x); while (oddn != 1, x = 3*oddn+1; oddn = x >> valuation(x, 2); listput(vl, oddn)); my(v = Vec(vl)); for (i=1, #v, v[i] = qvalue(v[i]);); v;} \\ A256598
    tabf(nn) = {for (n=0, nn, my(rown = row(n)); for (k=1, #rown, print1(rown[k], ", ")); print;);} \\ Michel Marcus, Oct 04 2019

A070165 Irregular triangle read by rows giving trajectory of n in Collatz problem.

Original entry on oeis.org

1, 2, 1, 3, 10, 5, 16, 8, 4, 2, 1, 4, 2, 1, 5, 16, 8, 4, 2, 1, 6, 3, 10, 5, 16, 8, 4, 2, 1, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 8, 4, 2, 1, 9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 10, 5, 16, 8, 4, 2, 1, 11, 34, 17, 52, 26, 13
Offset: 1

Views

Author

Eric W. Weisstein, Apr 23 2002

Keywords

Comments

n-th row has A008908(n) entries (unless some n never reaches 1, in which case the triangle ends with an infinite row). [Escape clause added by N. J. A. Sloane, Jun 06 2017]
A216059(n) is the smallest number not occurring in n-th row; see also A216022.
Comment on the mp3 file from Gordon Charlton (the recording artist Beat Frequency). The piece uses the first 3242 terms (i.e. the first 100 hailstone sequences), with pitch modulus 36, duration modulus 2. Its musicality stems from the many repetitions and symmetries within the sequence, and in particular the infrequency of multiples of 3. This means that when the pitch modulus is a multiple of 12 the notes are predominantly in the symmetric octatonic scale, known to modern classical composers as the second of Messiaen's modes of limited transposition, and to jazz musicians as half-whole diminished. - N. J. A. Sloane, Jan 30 2019

Examples

			The irregular array a(n,k) starts:
n\k   0  1  2  3  4   5  6   7  8  9 10 11 12 13 14 15 16 17 18 19
1:    1
2:    2  1
3:    3 10  5 16  8   4  2   1
4:    4  2  1
5:    5 16  8  4  2   1
6:    6  3 10  5 16   8  4   2  1
7:    7 22 11 34 17  52 26  13 40 20 10  5 16  8  4  2  1
8:    8  4  2  1
9:    9 28 14  7 22  11 34  17 52 26 13 40 20 10  5 16  8  4  2  1
10:  10  5 16  8  4   2  1
11:  11 34 17 52 26  13 40  20 10  5 16  8  4  2  1
12:  12  6  3 10  5  16  8   4  2  1
13:  13 40 20 10  5  16  8   4  2  1
14:  14  7 22 11 34  17 52  26 13 40 20 10  5 16  8  4  2  1
15:  15 46 23 70 35 106 53 160 80 40 20 10  5 16  8  4  2  1
... Reformatted and extended by _Wolfdieter Lang_, Mar 20 2014
		

Crossrefs

Cf. A006370 (step), A008908 (row lengths), A033493 (row sums).
Cf. A220237 (sorted rows), A347270 (array), A192719.
Cf. A070168 (Terras triangle), A256598 (reduced triangle).
Cf. A254311, A257480 (and crossrefs therein).
Cf. A280408 (primes).

Programs

  • Haskell
    a070165 n k = a070165_tabf !! (n-1) !! (k-1)
    a070165_tabf = map a070165_row [1..]
    a070165_row n = (takeWhile (/= 1) $ iterate a006370 n) ++ [1]
    a070165_list = concat a070165_tabf
    -- Reinhard Zumkeller, Oct 07 2011
    
  • Maple
    T:= proc(n) option remember; `if`(n=1, 1,
          [n, T(`if`(n::even, n/2, 3*n+1))][])
        end:
    seq(T(n), n=1..15);  # Alois P. Heinz, Jan 29 2021
  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Flatten[Table[Collatz[n], {n, 10}]] (* T. D. Noe, Dec 03 2012 *)
  • PARI
    row(n, lim=0)={if (n==1, return([1])); my(c=n, e=0, L=List(n)); if(lim==0, e=1; lim=n*10^6); for(i=1, lim, if(c%2==0, c=c/2, c=3*c+1); listput(L, c); if(e&&c==1, break)); return(Vec(L)); } \\ Anatoly E. Voevudko, Mar 26 2016; edited by Michel Marcus, Aug 10 2021
    
  • Python
    def a(n):
        if n==1: return [1]
        l=[n, ]
        while True:
            if n%2==0: n/=2
            else: n = 3*n + 1
            if n not in l:
                l+=[n, ]
                if n<2: break
            else: break
        return l
    for n in range(1, 101): print(a(n)) # Indranil Ghosh, Apr 14 2017

Formula

T(n,k) = T^{(k)}(n) with the k-th iterate of the Collatz map T with T(n) = 3*n+1 if n is odd and T(n) = n/2 if n is even, n >= 1. T^{(0)}(n) = n. k = 0, 1, ..., A008908(n) - 1. - Wolfdieter Lang, Mar 20 2014

Extensions

Name specified and row length A-number corrected by Wolfdieter Lang, Mar 20 2014

A075677 Reduced Collatz function R applied to the odd integers: a(n) = R(2n-1), where R(k) = (3k+1)/2^r, with r as large as possible.

Original entry on oeis.org

1, 5, 1, 11, 7, 17, 5, 23, 13, 29, 1, 35, 19, 41, 11, 47, 25, 53, 7, 59, 31, 65, 17, 71, 37, 77, 5, 83, 43, 89, 23, 95, 49, 101, 13, 107, 55, 113, 29, 119, 61, 125, 1, 131, 67, 137, 35, 143, 73, 149, 19, 155, 79, 161, 41, 167, 85, 173, 11, 179, 91, 185, 47, 191, 97, 197
Offset: 1

Views

Author

T. D. Noe, Sep 25 2002

Keywords

Comments

The even-indexed terms a(2i+2) = 6i+5 = A016969(i), i >= 0 [Comment corrected by Bob Selcoe, Apr 06 2015]. The odd-indexed terms are the same as A067745. Note that this sequence is A016789 with all factors of 2 removed from each term. Also note that a(4i-1) = a(i). No multiple of 3 is in this sequence. See A075680 for the number of iterations of R required to yield 1.
From Bob Selcoe, Apr 06 2015: (Start)
All numbers in this sequence appear infinitely often.
From Eq. 1 and Eq. 2 in Formulas: Eq. 1 is used with 1/3 of the numbers in this sequence, Eq. 2 is used with 2/3 of the numbers.
(End)
Empirical: For arbitrary m, Sum_{n=2..A007583(m)} (a(n) - a(n-1)) = 0. - Fred Daniel Kline, Nov 23 2015
From Wolfdieter Lang, Dec 07 2021: (Start)
Only positive numbers congruent to 1 or 5 modulo 6 appear.
i) For the sequence entry with value A016921(m), for m >= 0, that is, a value from {1, 7, 13, ...}, the indices n are given by the row of array A178415(2*m+1, k), for k >= 1.
ii) For the sequence entry with value A007528(m), for m >= 1, that is, a value from {5, 11, 17, ...}, the indices n are given by the row of array A178415(2*m, k), for k >= 1.
See also the array A347834 with permuted row numbers and columns k >= 0. (End)

Examples

			a(11) = 1 because 21 is the 11th odd number and R(21) = 64/64 = 1.
From _Wolfdieter Lang_, Dec 07 2021: (Start)
i) 1 (mod 6) entry 1 = A016921(0) appears for n = A178415(1, k) = A347834(1, k-1) (the arrays), for k >= 1, that is, for {1, 5, 21, ..} = A002450.
ii) 5 (mod 6) entry 11 = A007528(2) appears for n = A178415(4, k) = A347835(3, k-1) (the arrays), for k >= 1, that is, for {7, 29, 117, ..} = A072261. (End)
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section E16, pp. 330-336.
  • Victor Klee and Stan Wagon, Old and new unsolved problems in plane geometry and number theory, The Mathematical Association of America, 1991, p. 225, C(2n+1) = a(n+1), n >= 0.
  • Jeffrey C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010; see p. 57, also (90-9), p. 306.

Crossrefs

Cf. A006370, A014682 (for non-reduced Collatz maps), A087230 (A371093), A371094.
Odd bisection of A139391.
Even bisection of A067745, which is also the odd bisection of this sequence.
After the initial 1, the second leftmost column of A256598.
Row 2 of A372283.

Programs

  • Haskell
    a075677 = a000265 . subtract 2 . (* 6) -- Reinhard Zumkeller, Jan 08 2014
    
  • Maple
    f:=proc(n) local t1;
    if n=1 then RETURN(1) else
    t1:=3*n+1;
    while t1 mod 2 = 0 do t1:=t1/2; od;
    RETURN(t1); fi;
    end;
    # N. J. A. Sloane, Jan 21 2011
  • Mathematica
    nextOddK[n_] := Module[{m=3n+1}, While[EvenQ[m], m=m/2]; m]; (* assumes odd n *) Table[nextOddK[n], {n, 1, 200, 2}]
    v[x_] := IntegerExponent[x, 2]; f[x_] := (3*x + 1)/2^v[3*x + 1]; Table[f[2*n - 1], {n, 66}] (* L. Edson Jeffery, May 06 2015 *)
  • PARI
    a(n)=n+=2*n-1;n>>valuation(n,2) \\ Charles R Greathouse IV, Jul 05 2013
    
  • Python
    from sympy import divisors
    def a(n):
        return max(d for d in divisors(n) if d % 2)
    print([a(6*n - 2) for n in range(1, 101)]) # Indranil Ghosh, Apr 15 2017, after formula by Reinhard Zumkeller

Formula

a(n) = A000265(6*n-2) = A000265(3*n-1). - Reinhard Zumkeller, Jan 08 2014
From Bob Selcoe, Apr 05 2015: (Start)
For all n>=1 and for every k, there exists j>=0 dependent upon n and k such that either:
Eq. 1: a(n) = (3n-1)/2^(2j+1) when k = ((4^(j+1)-1)/3) mod 2^(2j+3). Alternatively: a(n) = A016789(n-1)/A081294(j+1) when k = A002450(j+1) mod A081294(j+2). Example: n=51; k=101 == 5 mod 32, j=1. a(51) = 152/8 = 19.
or
Eq. 2: a(n) = (3n-1)/4^j when k = (5*2^(2j+1) - 1)/3 mod 4^(j+1). Alternatively: a(n) = A016789(n-1)/A000302(j) when k = A072197(j) mod A000302(j+1). Example: n=91; k=181 == 53 mod 64, j=2. a(91) = 272/16 = 17.
(End) [Definition corrected by William S. Hilton, Jul 29 2017]
a(n) = a(n + g*2^r) - 6*g, n > -g*2^r. Examples: n=59; a(59)=11, r=5. g=-1: 11 = a(27) = 5 - (-1)*6; g=1: 11 = a(91) = 17 - 1*6; g=2: 11 = a(123) = 23 - 2*6; g=3: 11 = a(155) = 29 - 3*6; etc. - Bob Selcoe, Apr 06 2015
a(n) = a((1 + (3*n - 1)*4^(k-1))/3), k>=1 (cf. A191669). - L. Edson Jeffery, Oct 05 2015
a(n) = a(4n-1). - Bob Selcoe, Aug 03 2017
a(n) = A139391(2n-1). - Antti Karttunen, May 06 2024
Sum_{k=1..n} a(k) ~ n^2. - Amiram Eldar, Aug 26 2024
G.f.: Sum_{k>=1} ((3 + 2*(-1)^k)*x^(3*2^(k - 1) - (-2)^k/3 + 1/3) + (3 - 2*(-1)^k)*x^(2^(k - 1) - (-2)^k/3 + 1/3))/(x^(2^k) - 1)^2. - Miles Wilson, Oct 26 2024

A347834 An array A of the positive odd numbers, read by antidiagonals upwards, giving the present triangle T.

Original entry on oeis.org

1, 3, 5, 7, 13, 21, 9, 29, 53, 85, 11, 37, 117, 213, 341, 15, 45, 149, 469, 853, 1365, 17, 61, 181, 597, 1877, 3413, 5461, 19, 69, 245, 725, 2389, 7509, 13653, 21845, 23, 77, 277, 981, 2901, 9557, 30037, 54613, 87381, 25, 93, 309, 1109, 3925, 11605, 38229, 120149, 218453, 349525
Offset: 1

Views

Author

Wolfdieter Lang, Sep 20 2021

Keywords

Comments

For the definition of this array A see the formula section.
The rows of A appear in a draft by Immmo O. Kerner in eqs. (1) and (2) as so-called horizontal sequences (horizontale Folgen). Thanks to Dr. A. Eckert for sending me this paper.
This array with entry A(k, n) becomes equal to the array T with T(n, k) given in A178415 by using a permutation of the rows, and changing the offset: A(k, n) = T(pe(k), n+1), with pe(3*(L+1)) = 4*(L+1), pe(1+3*L) = 1 + 2*L, pe(2+3*L) = 2*(1 + 2*L), for L >= 0. This permutation appears in A265667.
A proper sub-array is A238475(n, k) = A(1 + 3*(k-1), n-1), for k >= 1 and n >= 1.
In the directed Collatz tree with nodes labeled with only positive odd numbers (see A256598 for the paths), here called CTodd, the level L = 0 (on the top) has the node with label 1 as root. Because 1 -> 1 there is an arrow (a 1-cycle or loop) at the root. The level L = 1 consists of the nodes with labels A(1, n), for n >= 1, and each node is connected to 1 by a downwards directed arrow. The next levels for L >= 2 are obtained using the successor rule (used also by Kerner): S(u) = (4*u - 1)/3 if u == 1 (mod 3), (2*u - 1)/3 if u == 5 (mod 3), and there is no successor S(u) = empty if u = 3 (mod 6), that is, this node is a leaf.
However, each node with label u on level L >= 1, except a leaf, has as successors at level L + 1 not only the node with S(u) but all the nodes with labels A(S(u), n), for n >= 0.
In this way each node (also the root) of this CTodd has in-degree 1 and infinite out-degree (for L >= 2 there are infinitely many infinite outgoing arrows). All nodes with label A(k, n) with n >= 1, have the same precursor as the node A(k,0) in this tree for each k >= 1.
Except for the loop (1-cycle) for the root 1 there are no cycles in this directed tree CTodd.
That each number N = 5 + 8*K, for K >= 0 appears in array A for some column n >= 1 uniquely can be proved, using the fact of strictly increasing rows and columns, by showing that the columns n = 1, 2, ..., c contain all positive integers congruent to 5 modulo 8 except those of the positive congruence class A(1, c+1) modulo 2^(2*c+3) by induction on c. [added Dec 05 2021]
Row index k for numbers congruent to 5 modulo 8: Each number N = 5 + 8*K, for K >= 0, from A004770 is a member of row k of the array A starting with element A(k, 0) = (2*A065883(2 + 3*N) - 1)/3. For this surjective map see A347840. [simplified Dec 05 2021]
The Collatz conjecture can be reduced to the conjecture that in this rooted and directed tree CTodd each positive odd number appears as a label once, that is, all entries of the array A appear.

Examples

			The array A(k, n) begins:
k\n  0   1   2    3    4     5      6      7       8       9       10 ...
-------------------------------------------------------------------------
1:   1   5  21   85  341  1365   5461  21845   87381  349525  1398101
2:   3  13  53  213  853  3413  13653  54613  218453  873813  3495253
3:   7  29 117  469 1877  7509  30037 120149  480597 1922389  7689557
4:   9  37 149  597 2389  9557  38229 152917  611669 2446677  9786709
5:  11  45 181  725 2901 11605  46421 185685  742741 2970965 11883861
6:  15  61 245  981 3925 15701  62805 251221 1004885 4019541 16078165
7:  17  69 277 1109 4437 17749  70997 283989 1135957 4543829 18175317
8:  19  77 309 1237 4949 19797  79189 316757 1267029 5068117 20272469
9:  23  93 373 1493 5973 23893  95573 382293 1529173 6116693 24466773
10: 25 101 405 1621 6485 25941 103765 415061 1660245 6640981 26563925
...
--------------------------------------------------------------------
The triangle T(k, n) begins:
k\n  0  1   2    3    4     5     6      7      8      9 ...
------------------------------------------------------------
1:   1
2:   3  5
3:   7 13  21
4:   9 29  53   85
5:  11 37 117  213  341
6:  15 45 149  469 853   1365
7:  17 61 181  597 1877  3413  5461
8:  19 69 245  725 2389  7509 13653  21845
9:  23 77 277  981 2901  9557 30037  54613  87381
10: 25 93 309 1109 3925 11605 38229 120149 218453 349525
...
-------------------------------------------------------------
Row index k of array A, for entries 5 (mod 8).
213 = 5 + 8*26. K = 28 is even, (3*231+1)/16 = 40, A065883(40) = 10, hence A(k, 0) = N' = (10-1)/3 = 3, and k = 2. Moreover, n = log_4((3*213 + 1)/(3*A(2,0) + 1)) = log_4(64) = 3. 213 = A(2, 3).
85 = 5 + 8*10. K = 10 is even, (3*85 + 1)/16 = 16, A065883(16) = 1, N' = (1-1)/3 = 0 is even, hence A(k, 0) = 4*0 + 1 = 1, k = 1. 85 = A(1, 3).
61 = 5 + 8*7, K = 7 is odd, k = (7+1)/2 + ceiling((7+1)/4) = 6, and n = log_4((3*61 + 1)/(3*A(6,0) + 1)) = 1. 61 = A(6, 1).
----------------------------------------------------------------------------
		

Crossrefs

Row sequences of the array A, also diagonal sequences of the triangle T: -A007583 (k=0), A002450(n+1), A072197, A072261(n+1), A206374(n+1), A072262(n+1), A072262(n+1), A072201(n+1), A330246(n+1), ...
Column sequences of the array A, also of the triangle T (shifted): A047529, A347836, A347837, ...

Programs

  • Maple
    # Seen as an array:
    A := (n, k) -> ((3*(n + floor(n/3)) - 1)*4^(k+1) - 2)/6:
    for n from 1 to 6 do seq(A(n, k), k = 0..9) od;
    # Seen as a triangle:
    T := (n, k) -> 2^(2*k + 1)*(floor((n - k)/3) - k + n - 1/3) - 1/3:
    for n from 1 to 9 do seq(T(n, k), k = 0..n-1) od;
    # Using row expansion:
    gf_row := k -> (1 / (x - 1) - A047395(k)) / (4*x - 1):
    for k from 1 to 10 do seq(coeff(series(gf_row(k), x, 11), x, n), n = 0..10) od;
    # Peter Luschny, Oct 09 2021
  • Mathematica
    A347834[k_, n_] := (4^n*(6*(Floor[k/3] + k) - 2) - 1)/3;
    Table[A347834[k - n, n], {k, 10}, {n, 0, k - 1}] (* Paolo Xausa, Jun 26 2025 *)

Formula

Array A:
A(k, 0) = A047529(k) (the positive odd numbers {1, 3, 7} (mod 8));
A(k, n) = ((3* A(k, 0) + 1)*4^n - 1)/3, for k >= 1 and n >= 0.
Recurrence for rows k >= 1: A(k, n) = 4*A(k, n-1) + 1, for n >= 1, with A(k, 0) = 2*(k + floor(k/3)) - 1 = A047529(k).
Explicit form: A(k, n) = ((3*(k + floor(k/3)) - 1)*4^(n+1) - 2)/6, k >= 1, n >= 0. Here 3*(k + floor(k/3)) = A319451(k).
Hence A(k, n) = 5 + 8*(2*A(k, n-2)), for n >= 1, with A(k, 0) = 2*(k + floor(k/3)) - 1 = A047529(k), and 2*A(k, -1) = (A(k, 1) - 5)/8 = k - 1 + floor(k/3) (equals index n of A(k, 1) in the sequence (A004770(n+1))_{n >= 0}). A(k, -1) is half-integer if k = A007494(m) = m + ceiling(m/2), for m >= 1, and A(k, -1) = 2*K if k = 1 + 3*K = A016777(K), for K >= 0.
O.g.f.: expansion in z gives o.g.f.s for rows k, also for k = 0: -A007583; expansion in x gives o.g.f.s for columns n.
G(z, x) = (2*(-1 + 3*z + 3*z^2 + 7*z^3)*(1-x) - (1-4*x)*(1-z^3)) / (3*(1-x)*(1-4*x)*(1-z)*(1-z^3)).
Triangle T:
T(k, n) = A(k - n, n), for k >= 1 and n = 0..k-1.
A(k, n) = [x^n] (1/(x - 1) - A047395(k)) / (4*x - 1). - Peter Luschny, Oct 09 2021

A372443 The n-th iterate of 27 with Reduced Collatz-function R, which gives the odd part of 3n+1.

Original entry on oeis.org

27, 41, 31, 47, 71, 107, 161, 121, 91, 137, 103, 155, 233, 175, 263, 395, 593, 445, 167, 251, 377, 283, 425, 319, 479, 719, 1079, 1619, 2429, 911, 1367, 2051, 3077, 577, 433, 325, 61, 23, 35, 53, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Antti Karttunen, May 01 2024

Keywords

Crossrefs

Column 14 of A372283, Row 13 of A256598 (but only up to the first 1).
Row 1 of A372560.
From term 47 to the first 1 same as A088593.
Sequences derived from this one or related to:
A372445 column index of a(n) in array A257852,
A372362 the 2-adic valuation of 1 + 3*a(n), equal to row index of a(n) in array A257852,
A372447 binary lengths minus 1,
A372446 a(n) xored with the term of A086893 having the same binary length,
A372453 a(n) minus the term of A086893 having the same binary length.

Programs

  • PARI
    R(n) = { n = 1+3*n; n>>valuation(n, 2); };
    A372443(n) = { my(x=27); while(n, x=R(x); n--); (x); };

Formula

a(0) = 27; for n > 0, a(n) = R(a(n-1)), where R(n) = (3*n+1)/2^A371093(n) = A000265(3*n+1).
For n > 0, a(n) = R(A372444(n-1)) = A000265(1+3*A372444(n-1)).

A257480 S(n) = (3 + (3/2)^v(1 + F(4*n - 3))*(1 + F(4*n - 3)))/6, n >= 1, where F(x) = (3*x + 1)/2^v(3*x + 1) for x odd, and v(y) denotes the 2-adic valuation of y.

Original entry on oeis.org

1, 1, 5, 2, 4, 1, 8, 5, 7, 5, 41, 5, 10, 2, 17, 14, 13, 4, 32, 8, 16, 1, 26, 14, 19, 8, 68, 11, 22, 5, 35, 41, 25, 7, 59, 14, 28, 5, 44, 23, 31, 41, 365, 17, 34, 5, 53, 41, 37, 10, 86, 20, 40, 2, 62, 32, 43, 17, 149
Offset: 1

Views

Author

L. Edson Jeffery, Apr 26 2015

Keywords

Comments

In the following, let F^(k)(x) denote k-fold iteration of F and defined by the recurrence F^(k)(x) = F(F^(k-1)(x)), k > 0, with initial condition F^(0)(x) = x, and let S^(k)(n) denote k-fold iteration of S and defined by the recurrence S^(k)(n) = S(S^(k-1)(n)), k > 0, with initial condition S^(0)(n) = n, where F and S are as defined above.
Theorem 1: For each x, there exists a j>0 such that F^(j)(x) == 1 (mod 4).
Theorem 2: S(n) = m if and only if S(4*n-2) = m.
Conjecture 1: For each n, there exists a k such that S^(k)(n) = 1.
Theorem 3: Conjecture 1 is equivalent to the 3x+1 conjecture.
Theorem 4: The sequence {log(S(n))/log(n)}_{n>1} is bounded with least upper bound equal to log(3)/log(2).
[I have proved Theorems 1--4 (along with several lemmas) and am trying to finish typesetting the draft containing the proofs but had been too ill to finish that work until now. The draft also contains the derivation of the function S from properties of the known function F (A075677). When that paper is completed (hopefully within two weeks) I will then upload it to the links section and delete this comment.]

References

  • K. H. Metzger, Untersuchungen zum (3n+1)-Algorithmus, Teil II: Die Konstruktion des Zahlenbaums, PM (Praxis der Mathematik in der Schule) 42, 2000, 27-32.

Crossrefs

Cf. A241957, A254067, A254311, A257499, A257791 (all used in the proof of Thm 4).
Cf. A253676 (iteration of S terminating at the first occurrence of 1, assuming the 3x+1 conjecture).

Programs

  • Mathematica
    v[x_] := IntegerExponent[x, 2]; f[x_] := (3*x + 1)/2^v[3*x + 1]; s[n_] := (3 + (3/2)^v[1 + f[4*n - 3]]*(1 + f[4*n - 3]))/6; Table[s[n], {n, 59}]
  • PARI
    a(n) = my(x=3*n-2, v=valuation(x, 2)); x>>=v; v=valuation(x+1, 2); (((x>>v)+1)*3^(v-1)+1)/2; \\ Ruud H.G. van Tol, Jul 30 2023

A372283 Array read by upward antidiagonals: A(n, k) = R(A(n-1, k)) for n > 1, k >= 1; A(1, k) = 2*k-1, where Reduced Collatz function R(n) gives the odd part of 3n+1.

Original entry on oeis.org

1, 1, 3, 1, 5, 5, 1, 1, 1, 7, 1, 1, 1, 11, 9, 1, 1, 1, 17, 7, 11, 1, 1, 1, 13, 11, 17, 13, 1, 1, 1, 5, 17, 13, 5, 15, 1, 1, 1, 1, 13, 5, 1, 23, 17, 1, 1, 1, 1, 5, 1, 1, 35, 13, 19, 1, 1, 1, 1, 1, 1, 1, 53, 5, 29, 21, 1, 1, 1, 1, 1, 1, 1, 5, 1, 11, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 1, 35, 25
Offset: 1

Views

Author

Antti Karttunen, Apr 28 2024

Keywords

Comments

Collatz conjecture is equal to the claim that in each column 1 will eventually appear. See also arrays A372287 and A372288.

Examples

			Array begins:
n\k| 1  2  3   4   5   6   7   8   9  10  11  12  13   14  15   16  17  18
---+-----------------------------------------------------------------------
1  | 1, 3, 5,  7,  9, 11, 13, 15, 17, 19, 21, 23, 25,  27, 29,  31, 33, 35,
2  | 1, 5, 1, 11,  7, 17,  5, 23, 13, 29,  1, 35, 19,  41, 11,  47, 25, 53,
3  | 1, 1, 1, 17, 11, 13,  1, 35,  5, 11,  1, 53, 29,  31, 17,  71, 19,  5,
4  | 1, 1, 1, 13, 17,  5,  1, 53,  1, 17,  1,  5, 11,  47, 13, 107, 29,  1,
5  | 1, 1, 1,  5, 13,  1,  1,  5,  1, 13,  1,  1, 17,  71,  5, 161, 11,  1,
6  | 1, 1, 1,  1,  5,  1,  1,  1,  1,  5,  1,  1, 13, 107,  1, 121, 17,  1,
7  | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  5, 161,  1,  91, 13,  1,
8  | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 121,  1, 137,  5,  1,
9  | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  91,  1, 103,  1,  1,
10 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 137,  1, 155,  1,  1,
11 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 103,  1, 233,  1,  1,
12 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 155,  1, 175,  1,  1,
13 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 233,  1, 263,  1,  1,
14 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 175,  1, 395,  1,  1,
15 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 263,  1, 593,  1,  1,
16 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 395,  1, 445,  1,  1,
		

Crossrefs

Cf. A005408 (row 1), A075677 (row 2), A372443 (column 14).
Arrays derived from this one or related to:
A372287 the column index of A(n, k) in array A257852,
A372361 terms xored with binary words of the same length, either of the form 10101...0101 or 110101...0101, depending on whether the binary length is odd or even,
A372360 binary weights of A372361.
Cf. also array A371095 (giving every fourth column, 1, 5, 9, ...) and irregular array A256598 which gives the terms of each column, but only down to the first 1.

Programs

  • Mathematica
    With[{dmax = 15}, Table[#[[k, n-k+1]], {n, dmax}, {k, n}] & [Array[NestList[(3*# + 1)/2^IntegerExponent[3*# + 1, 2] &, 2*# - 1, dmax - #] &, dmax]]] (* Paolo Xausa, Apr 29 2024 *)
  • PARI
    up_to = 91;
    R(n) = { n = 1+3*n; n>>valuation(n, 2); };
    A372283sq(n,k) = if(1==n,2*k-1,R(A372283sq(n-1,k)));
    A372283list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A372283sq((a-(col-1)),col))); (v); };
    v372283 = A372283list(up_to);
    A372283(n) = v372283[n];

Formula

For n > 1, A(n, k) = R(A372282(n-1, k)), where R(n) = (3*n+1)/2^A371093(n).
For all k >= 1, A(A258145(k-1), k) = 1 [which is the topmost 1 in each column].

A254068 Irregular triangle T read by rows in which the entry in row n and column k is given by T(n,k) = 4*A253676(n,k) - 3, k = 1..A253720(n), assuming the 3x+1 (or Collatz) conjecture.

Original entry on oeis.org

1, 5, 1, 9, 17, 13, 5, 1, 13, 5, 1, 17, 13, 5, 1, 21, 1, 25, 29, 17, 13, 5, 1, 29, 17, 13, 5, 1, 33, 25, 29, 17, 13, 5, 1, 37, 17, 13, 5, 1, 41, 161, 121, 137, 233, 593, 445, 377, 425, 2429, 3077, 577, 433, 325, 61, 53, 5, 1, 45, 17, 13, 5, 1
Offset: 1

Views

Author

L. Edson Jeffery, May 03 2015

Keywords

Comments

Definitions: Let v(y) denote the 2-adic valuation of y. Let N_1 denote the set of odd natural numbers. Let F : N_1 -> N_1 be the map defined by F(x) = (3*x + 1)/2^v(3*x + 1) (cf. A075677). Let F^(k)(x) denote k-fold iteration of F and defined by the recurrence F^(k)(x) = F(F^(k-1)(x)), k>0, with initial condition F^(0)(x) = x.
This triangle can be constructed by restricting the initial values to the numbers 4*n - 3, iterating F until 1 is reached (assuming the 3x+1 conjecture) and removing all iterates not congruent to 1 modulo 4. Equivalently, for each n, this is accomplished by iterating (until 1 is reached, assuming the 3x+1 conjecture) the function S defined in A257480 to get the triangle A253676, and finally taking T(n,k) = 4*A253676(n,k) - 3.
Conjecture: For each natural number n, there exists a k >= 0, such that F^k(4*n - 3) = 1.
Theorem 1: Conjecture 1 is equivalent to the 3x+1 (or Collatz) conjecture.
Proof: See A257480.

Examples

			T begins:
   1
   5   1
   9  17  13   5   1
  13   5   1
  17  13   5   1
  21   1
  25  29  17  13   5   1
  29  17  13   5   1
  33  25  29  17  13   5   1
  37  17  13   5   1
  41 161 121 137 233 593 445 377 425 2429 3077 577 433 325 61 53 5 1
  45  17  13   5   1
  49  37  17  13   5   1
  53   5   1
  57  65  49  37  17  13   5   1
		

Crossrefs

Programs

  • Mathematica
    v[x_] := IntegerExponent[x, 2]; f[x_] := (3*x + 1)/2^v[3*x + 1]; s[n_] := NestWhileList[(3 + (3/2)^v[1 + f[4*# - 3]]*(1 + f[4*# - 3]))/6 &, n, # > 1 &]; t = Table[4*s[n] - 3, {n, 1, 15}]; Flatten[t] (* Replace Flatten with Grid to display the triangle *)

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
Showing 1-10 of 14 results. Next