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

A372287 Array read by upward antidiagonals: A(n, k) = A371092(A372283(n, k)), n,k >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 28 2024

Keywords

Comments

A(n, k) gives the column index of A372282(n, k) [or equally, of A372283(n, k)] in array A257852.
Collatz conjecture is equal to the claim that in each column 1 will eventually appear.

Examples

			Array begins:
n\k| 1  2  3  4  5  6  7  8  9 10 11 12 13  14 15  16 17 18 19  20
---+---------------------------------------------------------------
1  | 1, 1, 1, 2, 2, 3, 1, 4, 3, 5, 1, 6, 4,  7, 2,  8, 5, 9, 2, 10,
2  | 1, 1, 1, 3, 2, 3, 1, 6, 1, 2, 1, 9, 5,  6, 3, 12, 4, 1, 2, 15,
3  | 1, 1, 1, 3, 3, 1, 1, 9, 1, 3, 1, 1, 2,  8, 3, 18, 5, 1, 3, 12,
4  | 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3, 12, 1, 27, 2, 1, 3, 17,
5  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 18, 1, 21, 3, 1, 1,  4,
6  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 1, 16, 3, 1, 1,  5,
7  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 21, 1, 23, 1, 1, 1,  2,
8  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 1, 18, 1, 1, 1,  3,
9  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 26, 1, 1, 1,  3,
10 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 1, 39, 1, 1, 1,  1,
11 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 26, 1, 30, 1, 1, 1,  1,
12 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 39, 1, 44, 1, 1, 1,  1,
13 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 30, 1, 66, 1, 1, 1,  1,
14 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 44, 1, 99, 1, 1, 1,  1,
15 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 66, 1, 75, 1, 1, 1,  1,
16 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 99, 1, 28, 1, 1, 1,  1,
17 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 75, 1, 42, 1, 1, 1,  1,
18 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 1, 63, 1, 1, 1,  1,
19 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 42, 1, 48, 1, 1, 1,  1,
20 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 63, 1, 71, 1, 1, 1,  1,
		

Crossrefs

Cf. also A371097 (array giving every fourth column, 1, 5, 9, ...), A371103 (array giving every even numbered column), also array A371101.

Programs

  • PARI
    up_to = 105;
    A000265(n) = (n>>valuation(n,2));
    A371092(n) = floor((A000265(1+(3*n))+5)/6);
    R(n) = { n = 1+3*n; n>>valuation(n, 2); };
    A372283sq(n,k) = if(1==n,2*k-1,R(A372283sq(n-1,k)));
    A372287sq(n,k) = A371092(A372283sq(n,k));
    A372287list(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] = A372287sq((a-(col-1)),col))); (v); };
    v372287 = A372287list(up_to);
    A372287(n) = v372287[n];

Formula

A(n, k) = A371092(A372282(n,k)) = A371092(A372283(n,k)).

A372361 Array read by upward antidiagonals: A(n, k) = A372358(A372283(n, k)), n,k >= 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 6, 4, 0, 0, 0, 4, 2, 6, 0, 0, 0, 0, 6, 4, 0, 0, 0, 0, 0, 4, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 22, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 22, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 14
Offset: 1

Views

Author

Antti Karttunen, May 01 2024

Keywords

Examples

			Array begins:
n\k| 1  2  3  4  5  6  7   8  9 10 11  12  13   14 15   16  17  18  19  20
---+------------------------------------------------------------------------
1  | 0, 0, 0, 2, 4, 6, 0,  2, 4, 6, 0,  2, 12,  14, 8,  10, 20, 22, 16, 18,
2  | 0, 0, 0, 6, 2, 4, 0,  2, 0, 8, 0, 22,  6,  28, 6,  26, 12,  0,  2, 14,
3  | 0, 0, 0, 4, 6, 0, 0, 22, 0, 6, 0,  0,  8,  10, 4,  18,  6,  0,  6, 12,
4  | 0, 0, 0, 0, 4, 0, 0,  0, 0, 4, 0,  0,  6,  26, 0,  62,  8,  0,  4, 22,
5  | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  4,  18, 0, 116,  6,  0,  0, 48,
6  | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0,  62, 0,  44,  4,  0,  0,  6,
7  | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0, 116, 0,  14,  0,  0,  0,  8,
8  | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0,  44, 0,  92,  0,  0,  0,  6,
9  | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0,  14, 0,  50,  0,  0,  0,  4,
10 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0,  92, 0,  78,  0,  0,  0,  0,
11 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0,  50, 0,  60,  0,  0,  0,  0,
12 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0,  78, 0, 122,  0,  0,  0,  0,
13 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0,  60, 0,  82,  0,  0,  0,  0,
14 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0, 122, 0, 222,  0,  0,  0,  0,
15 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0,  82, 0, 260,  0,  0,  0,  0,
16 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0, 222, 0, 232,  0,  0,  0,  0,
17 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0, 260, 0, 114,  0,  0,  0,  0,
18 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0, 232, 0,  46,  0,  0,  0,  0,
19 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0, 114, 0,  44,  0,  0,  0,  0,
20 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0,  46, 0,  78,  0,  0,  0,  0,
21 | 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0,  0,  0,  44, 0, 252,  0,  0,  0,  0,
		

Crossrefs

Cf. A075677, A086893, A372283, A372358, A372360 (binary weights), A372446 (column 14).
Cf. also A372359.

Programs

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

A371094 a(n) = m*(2^e) + ((4^e)-1)/3, where m = 3n+1, and e is the 2-adic valuation of m.

Original entry on oeis.org

1, 21, 7, 21, 13, 341, 19, 45, 25, 117, 31, 69, 37, 341, 43, 93, 49, 213, 55, 117, 61, 5461, 67, 141, 73, 309, 79, 165, 85, 725, 91, 189, 97, 405, 103, 213, 109, 1877, 115, 237, 121, 501, 127, 261, 133, 1109, 139, 285, 145, 597, 151, 309, 157, 5461, 163, 333, 169, 693, 175, 357, 181, 1493, 187, 381, 193, 789, 199
Offset: 0

Views

Author

Antti Karttunen (proposed by Ali Sada), Apr 19 2024

Keywords

Comments

Construction: take the binary expansion of 3n+1 (A016777(n)), and substitute "01" for all trailing 0-bits that follow after its odd part (= A067745(1+n)), of which there are A371093(n) in total. See the examples.

Examples

			For n=1, 3*n+1 = 4, "100" in binary, when we substitute 01's for the two trailing 0's, we obtain 21, "10101" in binary, therefore a(1) = 21.
For n=6, 3*6+1 = 19, "10011" in binary, and there are no trailing 0's, and no changes, therefore a(6) = 19.
For n=7, 3*7+1 = 22, "10110" in binary, with one trailing 0, which when replaced with 01 gives us 45, "101101" in binary, therefore a(7) = 45.
For n=229, there are e=4 trailing bit expansions 0 -> 01,
  3n+1 = binary  101011  0 0 0 0
  a(n) = binary  101011 01010101
		

Crossrefs

Cf. A016921, A372351 (even and odd bisection), A372290 (numbers occurring in the latter).
Cf. also A302338.

Programs

  • Mathematica
    Array[#2*(2^#3) + ((4^#3) - 1)/3 & @@ {#1, #2, IntegerExponent[#2, 2]} & @@ {#, 3 #1 + 1} &, 67, 0] (* Michael De Vlieger, Apr 19 2024 *)
  • PARI
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    
  • Python
    def A371094(n): return ((m:=3*n+1)<<(e:=(~m & m-1).bit_length()))+((1<<(e<<1))-1)//3 # Chai Wah Wu, Apr 28 2024

Formula

a(n) = A372289(A016777(n)).
a(2n) = A016777(2n) = A016921(n).

A372282 Array read by upward antidiagonals: A(n, k) = A371094(A(n-1, k)) for n > 1, k >= 1; A(1, k) = 2*k-1.

Original entry on oeis.org

1, 21, 3, 5461, 21, 5, 357913941, 5461, 341, 7, 1537228672809129301, 357913941, 1398101, 45, 9, 28356863910078205288614550619314017621, 1537228672809129301, 23456248059221, 1109, 117, 11, 9649340769776349618630915417390658987772498722136713669954798667326094136661, 28356863910078205288614550619314017621, 6602346876188694799461995861, 873813, 11605, 69, 13
Offset: 1

Views

Author

Antti Karttunen, Apr 28 2024

Keywords

Examples

			Array begins:
n\k|    1     2        3     4      5     6        7     8      9     10
---+----------------------------------------------------------------------
1  |    1,    3,       5,    7,     9,   11,      13,   15,    17,    19,
2  |   21,   21,     341,   45,   117,   69,     341,   93,   213,   117,
3  | 5461, 5461, 1398101, 1109, 11605, 3413, 1398101, 2261, 87381, 11605,
		

Crossrefs

Cf. A005408 (row 1), A372351 (row 2, bisection of A371094), A372444 (column 14).
Arrays derived from this one:
A372285 the number of terms of A086893 in the interval [A(n, k), A(1+n, k)],
A372287 the column index of A(n, k) in array A257852,
A372288 the sum of digits of A(n, k) in "Jacobsthal greedy base",
A372353 differences between A(n,k) and the largest term of A086893 <= A(n,k),
A372354 floor(log_2(.)) of terms, A372356 (and their columnwise first differences),
A372359 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.
Cf. also arrays A371096, A371102 that give subsets of columns of this array, and array A371100 that gives the terms of the row 2 in different order.

Programs

  • PARI
    up_to = 28;
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372282sq(n,k) = if(1==n,2*k-1,A371094(A372282sq(n-1,k)));
    A372282list(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] = A372282sq((a-(col-1)),col))); (v); };
    v372282 = A372282list(up_to);
    A372282(n) = v372282[n];

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)).

A256598 Irregular triangle where row n contains the odd terms in the Collatz sequence beginning with 2n+1.

Original entry on oeis.org

1, 3, 5, 1, 5, 1, 7, 11, 17, 13, 5, 1, 9, 7, 11, 17, 13, 5, 1, 11, 17, 13, 5, 1, 13, 5, 1, 15, 23, 35, 53, 5, 1, 17, 13, 5, 1, 19, 29, 11, 17, 13, 5, 1, 21, 1, 23, 35, 53, 5, 1, 25, 19, 29, 11, 17, 13, 5, 1, 27, 41, 31, 47, 71, 107, 161, 121, 91, 137, 103, 155
Offset: 0

Views

Author

Bob Selcoe, Apr 03 2015

Keywords

Comments

The Collatz function is an integer-valued function given by n/2 if n is even and 3n+1 if n is odd. We build a Collatz sequence by beginning with a natural number and iterating the function indefinitely. It is conjectured that all such sequences terminate at 1.
In this triangle, row n is made up of the odd terms of the Collatz sequence beginning with 2n+1. Therefore, it is conjectured that this sequence is well-defined, i.e., that all rows terminate at 1.
The last index k in row n gives the number of iterations required for the Collatz sequence to terminate if even terms are omitted.
T(n,k)/T(n,k+1) is of form: ceiling(T(n,k)*3/2^j) for some j>=1. Therefore, the coefficients in each row may be read as a series of iterated ceilings, where j may vary. For example, row 3 has initial term 7, which is followed by ceiling(7*3/2), ceiling(ceiling(7*3/2)*3/2), ceiling(ceiling(ceiling(7*3/2)*3/2)*3/4), ceiling(ceiling(ceiling(ceiling(7*3/2)*3/2)*3/4)*3/8), ceiling(ceiling(ceiling(ceiling(ceiling(7*3/2)*3/2)*3/4)*3/8)*3/16).
The length of row n is A258145(n) (set to 0 if 1 is not reached after a finite number of steps). - Wolfdieter Lang, Aug 11 2021

Examples

			Triangle starts T(0,0):
n\k   0   1   2   3   4    5   6   7   8   9  10 ...
0:    1
1:    3   5   1
2:    5   1
3:    7   11  17  13  5    1
4:    9   7   11  17  13   5   1
5:    11  17  13  5   1
6:    13  5   1
7:    15  23  35  53  5    1
8:    17  13  5   1
9:    19  29  11  17  13   5   1
10:   21  1
11:   23  35  53  5    1
12:   25  19  29  11  17  13   5   1
...
n=13 starts with 27 and takes 41 steps: (27), 41, 31, 47, 71, 107,... 53, 5, 1, (see A372443).
Row 8 is [17, 13, 5, 1] because it is the subsequence of odd terms for the Collatz sequence starting with 17: [17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1].
		

Crossrefs

Cf. A372443 (row 13 up to its first 1).
Cf. also array A372283 showing the same terms in different orientation.

Programs

  • Mathematica
    f[n_] := NestWhileList[(3*# + 1)/2^IntegerExponent[3*# + 1, 2] &, 2*n + 1, # > 1 &]; Grid[Table[f[n], {n, 0, 12}]] (* L. Edson Jeffery, Apr 25 2015 *)
  • PARI
    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)); Vec(vl);}
    tabf(nn) = {for (n=0, nn, my(rown = row(n)); for (k=1, #rown, print1(rown[k], ", ")); print;);} \\ Michel Marcus, Oct 04 2019
  • Sage
    def Collatz(n):
        A = [n]
        b = A[-1]
        while b != 1:
            if is_even(b):
                A.append(b//2)
            else:
                A.append(3*b+1)
        return A
    [y for sublist in [[x for x in Collatz(2*n+1) if is_odd(x)] for n in [0..15]] for y in sublist] # Tom Edgar, Apr 04 2015
    

Formula

T(n,0) = 2n+1 and T(n,k) = A000265(3*T(n,k-1)+1) for k>0. - Tom Edgar, Apr 04 2015

A372288 Array read by upward antidiagonals: A(n, k) = A265745(A372282(n, k)), n,k >= 1, where A265745(n) is the sum of digits in "Jacobsthal greedy base".

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 5, 3, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 5, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 5, 3
Offset: 1

Views

Author

Antti Karttunen, Apr 28 2024

Keywords

Comments

Collatz conjecture is equal to the claim that each column will eventually settle to constant 1's, somewhere under its topmost row. This works as only the bisection A002450 of Jacobsthal numbers (A001045) contains numbers of the form 4k+1, while the other bisection contains only numbers of the form 4k+3, which do not occur among the range of A372351. See also the comments in A371094.

Examples

			Array begins:
n\k| 1  2  3  4  5  6  7  8  9 10 11 12 13     14 15    16 17 18 19 20    21 22
---+----------------------------------------------------------------------------
1  | 1, 1, 1, 3, 3, 1, 3, 3, 3, 3, 1, 3, 3,     3, 3,    3, 3, 3, 3, 5,    5, 1,
2  | 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 1, 5, 5,     5, 3,    5, 3, 3, 3, 5,    5, 3,
3  | 1, 1, 1, 3, 3, 3, 1, 5, 1, 3, 1, 3, 3,     5, 3,    5, 5, 1, 3, 3,    5, 3,
4  | 1, 1, 1, 3, 3, 1, 1, 3, 1, 3, 1, 1, 3,     5, 3,    3, 3, 1, 3, 5,    5, 3,
5  | 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3,     5, 1,    5, 3, 1, 3, 3,    3, 3,
6  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,     3, 1,    5, 3, 1, 1, 5,    5, 3,
7  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    3, 3, 1, 1, 3,    5, 3,
8  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 3,    3, 3,
9  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     3, 1,    5, 1, 1, 1, 3,    5, 1,
10 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 3,    5, 1,
11 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1, 2155, 1, 1, 1, 1,    5, 1,
12 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 1, 6251, 1,
13 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10347, 1,    5, 1, 1, 1, 1,    5, 1,
14 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 1,    5, 1,
15 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    7, 1, 1, 1, 1,    5, 1,
16 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 1,    7, 1,
		

Crossrefs

Cf. also array A372561 (formed by columns whose indices in this array are given by A372443).

Programs

A372360 Array read by upward antidiagonals: A(n, k) = A000120(A372361(n, k)), n,k >= 1; Binary weights of terms of arrays A372359 and A372361.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3
Offset: 1

Views

Author

Antti Karttunen, May 01 2024

Keywords

Comments

Entry A(n, k) at row n and column k tells how many bits needs to be flipped in the binary expansion of the (n-1)-th iterate of Reduced Collatz function R, when started from 2*k-1, to obtain the unique term of A086893 with the same binary length as that (n-1)-th iterate. That is, A(n, k) gives the Hamming distance between A372283(n, k) and A086893(1+A000523(A372283(n, k))).
Zeros occur in the same locations as where they occur in A372359, etc.

Examples

			Array begins:
n\k| 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
---+-------------------------------------------------------------------------
1  | 0, 0, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 2, 3, 1, 2, 2, 3, 1, 2, 3, 4, 2, 3,
2  | 0, 0, 0, 2, 1, 1, 0, 1, 0, 1, 0, 3, 2, 3, 2, 3, 2, 0, 1, 3, 2, 2, 1, 2,
3  | 0, 0, 0, 1, 2, 0, 0, 3, 0, 2, 0, 0, 1, 2, 1, 2, 2, 0, 2, 2, 3, 1, 0, 5,
4  | 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 2, 3, 0, 5, 1, 0, 1, 3, 2, 1, 0, 4,
5  | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 4, 2, 0, 0, 2, 5, 1, 0, 3,
6  | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 3, 1, 0, 0, 2, 4, 2, 0, 3,
7  | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 3, 0, 0, 0, 1, 3, 1, 0, 4,
8  | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 2, 3, 0, 0, 3,
9  | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 1, 4, 0, 0, 4,
10 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 3, 0, 0, 4,
11 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 4, 0, 0, 5,
12 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0, 0, 0, 4, 0, 0, 3,
13 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 3, 0, 0, 0, 0, 5, 0, 0, 6,
14 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 6, 0, 0, 0, 0, 3, 0, 0, 2,
15 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 0, 0, 0, 0, 6, 0, 0, 4,
16 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 4, 0, 0, 0, 0, 2, 0, 0, 4,
17 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 0, 0, 0, 4, 0, 0, 4,
18 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 4, 0, 0, 3,
19 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 3, 0, 0, 0, 0, 4, 0, 0, 4,
20 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 3, 0, 0, 6,
21 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 6, 0, 0, 0, 0, 4, 0, 0, 4,
We have A372283(5, 14) = 71, and when we compare the binary expansion of 71 = 1000111_2 with the term of A086893 that has a binary expansion of the same length, which in this case is 85 = 1010101_2, we see that only the bits at positions 1 and 4 (indexed from the right hand end, with 0 being the least significant bit position at right) need to be toggled to obtain the 71 from 85 or vice versa, therefore A(5, 14) = 2.
We have A372283(6, 14) = 107 = 1101011_2, and when xored with A086893(7) = 85 = 1010101_2, we obtain A372361(6, 14) = 62 = 111110_2, with five 1-bits, therefore A(6, 14) = 5. I.e., five bits (all except the least and the most significant bit) need to be flipped to change 85 to 107 or vice versa.
		

Crossrefs

Binary weights of A372359 and A372361.
Cf. also A372288.

Programs

Formula

A(n, k) = A000120(A372361(n, k)) = A000120(A372358(A372283(n, k))).
A(n, k) = A000120(A372359(n, k)) = A000120(A372358(A372282(n, k))).
Showing 1-9 of 9 results.