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

A341840 Square array T(n, k), n, k >= 0, read by antidiagonals; for any number m with runs in binary expansion (r_1, ..., r_j), let R(m) = {r_1 + ... + r_j, r_2 + ... + r_j, ..., r_j}; T(n, k) is the unique number t such that R(t) is the intersection of R(n) and of R(k).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Feb 21 2021

Keywords

Comments

For any m > 0, R(m) contains the partial sums of the m-th row of A227736; by convention, R(0) = {}.
The underlying idea is to merge in an optimal way the runs in binary expansions of n and of k so that they match, hence the relationship with A003188.

Examples

			Array T(n, k) begins:
  n\k|  0  1  2  3  4  5  6  7   8   9  10  11  12  13  14  15
  ---+--------------------------------------------------------
    0|  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0   0
    1|  0  1  1  0  0  1  1  0   0   1   1   0   0   1   1   0
    2|  0  1  2  3  3  2  1  0   0   1   2   3   3   2   1   0
    3|  0  0  3  3  3  3  0  0   0   0   3   3   3   3   0   0
    4|  0  0  3  3  4  4  7  7   7   7   4   4   3   3   0   0
    5|  0  1  2  3  4  5  6  7   7   6   5   4   3   2   1   0
    6|  0  1  1  0  7  6  6  7   7   6   6   7   0   1   1   0
    7|  0  0  0  0  7  7  7  7   7   7   7   7   0   0   0   0
    8|  0  0  0  0  7  7  7  7   8   8   8   8  15  15  15  15
    9|  0  1  1  0  7  6  6  7   8   9   9   8  15  14  14  15
   10|  0  1  2  3  4  5  6  7   8   9  10  11  12  13  14  15
   11|  0  0  3  3  4  4  7  7   8   8  11  11  12  12  15  15
   12|  0  0  3  3  3  3  0  0  15  15  12  12  12  12  15  15
   13|  0  1  2  3  3  2  1  0  15  14  13  12  12  13  14  15
   14|  0  1  1  0  0  1  1  0  15  14  14  15  15  14  14  15
   15|  0  0  0  0  0  0  0  0  15  15  15  15  15  15  15  15
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, k) = T(k, n).
T(m, T(n, k)) = T(T(m, n), k).
T(n, n) = n.
T(n, 0) = 0.
A070939(T(n, k)) <= min(A070939(n), A070939(k)).
A003188(T(n, k)) = A003188(n) AND A003188(k) (where AND denotes the bitwise AND operator).

A341841 Square array T(n, k), n, k >= 0, read by antidiagonals upwards; for any number m with runs in binary expansion (r_1, ..., r_j), let R(m) = {r_1 + ... + r_j, r_2 + ... + r_j, ..., r_j}; T(n, k) is the unique number t such that R(t) equals R(n) minus R(k).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Feb 21 2021

Keywords

Comments

For any m > 0, R(m) contains the partial sums of the m-th row of A227736; by convention, R(0) = {}.
This sequence uses set subtraction, and is related to:
- A003987 which uses set difference,
- A341839 which uses set union,
- A341840 which uses set intersection.

Examples

			Array T(n, k) begins:
  n\k|   0   1   2   3   4   5   6   7  8  9  10  11  12  13  14  15
  ---+--------------------------------------------------------------
    0|   0   0   0   0   0   0   0   0  0  0   0   0   0   0   0   0
    1|   1   0   0   1   1   0   0   1  1  0   0   1   1   0   0   1
    2|   2   3   0   1   1   0   3   2  2  3   0   1   1   0   3   2
    3|   3   3   0   0   0   0   3   3  3  3   0   0   0   0   3   3
    4|   4   4   7   7   0   0   3   3  3  3   0   0   7   7   4   4
    5|   5   4   7   6   1   0   3   2  2  3   0   1   6   7   4   5
    6|   6   7   7   6   1   0   0   1  1  0   0   1   6   7   7   6
    7|   7   7   7   7   0   0   0   0  0  0   0   0   7   7   7   7
    8|   8   8   8   8  15  15  15  15  0  0   0   0   7   7   7   7
    9|   9   8   8   9  14  15  15  14  1  0   0   1   6   7   7   6
   10|  10  11   8   9  14  15  12  13  2  3   0   1   6   7   4   5
   11|  11  11   8   8  15  15  12  12  3  3   0   0   7   7   4   4
   12|  12  12  15  15  15  15  12  12  3  3   0   0   0   0   3   3
   13|  13  12  15  14  14  15  12  13  2  3   0   1   1   0   3   2
   14|  14  15  15  14  14  15  15  14  1  0   0   1   1   0   0   1
   15|  15  15  15  15  15  15  15  15  0  0   0   0   0   0   0   0
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, n) = 0.
T(n, 0) = n.
T(T(n, k), k) = T(n, k).
A070939(T(n, k)) <= A070939(n).
A003188(T(n, k)) = A003188(n) - (A003188(n) AND A003188(k)) (where AND denotes the bitwise AND operator).
Showing 1-2 of 2 results.