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

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

A372358 a(n) = n XOR A086893(1+A000523(n)), where XOR is a bitwise-XOR, A003987.

Original entry on oeis.org

0, 1, 0, 1, 0, 3, 2, 5, 4, 7, 6, 1, 0, 3, 2, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 21, 20, 23, 22, 17, 16, 19, 18, 29, 28, 31, 30, 25, 24, 27, 26, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 21, 20, 23, 22, 17, 16, 19, 18, 29, 28, 31, 30, 25, 24, 27, 26, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15
Offset: 1

Views

Author

Antti Karttunen, May 01 2024

Keywords

Comments

a(n) gives n xored with the unique term of A086893 that has the same binary length as n itself. The binary expansions of the terms of A086893 are of the form 10101...0101 (i.e., alternating 1's and 0's starting and ending with 1) when the binary length is odd, and of the form 110101...0101 (i.e., 1 followed by alternating 1's and 0's, and ending with 1) when the binary length is even. In other words, a(n) is n with its all its even-positioned bits (indexing starts from 0 which stands for the least significant bit) inverted, and additionally also the odd-positioned most significant bit inverted if the number of significant bits is even (i.e., n is a nonzero term of A053754).

Examples

			25 in binary is 11001_2, and inverting all the even-positioned bits gives 01100_2, and as A007088(12) = 1100, a(25) = 12.
46 in binary is 101110_2, so we flip all the even-positioned bits (starting from the rightmost, with position 0), and because there are even number of bits in the binary expansion, we flip also the most significant bit, thus we obtain 011011_2, and as A007088(27) = 11011, a(46) = 27.
		

Crossrefs

Programs

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

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 24, 4, 0, 0, 0, 256, 32, 6, 0, 0, 0, 0, 6144, 16, 0, 0, 0, 0, 0, 16777216, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 8, 4, 0, 0, 0, 0, 0, 0, 0, 1408, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6144, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16777216, 0, 88, 12
Offset: 1

Views

Author

Antti Karttunen, May 01 2024

Keywords

Comments

Zeros occur in the same locations as where they occur in A372353 and where 1's occur in array A372287.

Examples

			Array begins:
n\k| 1  2  3    4     5   6  7     8  9    10 11  12         13             14
---+----------------------------------------------------------------------------
1  | 0, 0, 0,   2,    4,  6, 0,    2, 4,    6, 0,  2,        12,            14,
2  | 0, 0, 0,  24,   32, 16, 0,    8, 0,   32, 0, 88,        96,           112,
3  | 0, 0, 0, 256, 6144,  0, 0, 1408, 0, 6144, 0,  0,      8192,          2560,
4  | 0, 0, 0,   0, 2^24,  0, 0,    0, 0, 2^24, 0,  0, 402653184,       6815744,
5  | 0, 0, 0,   0,    0,  0, 0,    0, 0,    0, 0,  0,      2^56, 4947802324992,
6  | 0, 0, 0,   0,    0,  0, 0,    0, 0,    0, 0,  0,         0,     31 * 2^79,
where 2^56 = 72057594037927936 and 31 * 2^79 = 18738350204026752207945728.
		

Crossrefs

Cf. also A372353.

Programs

Formula

A(n, k) = A372282(n,k) XOR A086893(1+A372354(n, k)), where XOR is bitwise-xor, A003987.

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

Showing 1-4 of 4 results.