login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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).
4
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,13
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.
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).
EXAMPLE
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
PROG
(PARI) See Links section.
KEYWORD
nonn,tabl,base
AUTHOR
Rémy Sigrist, Feb 21 2021
STATUS
approved