login
A352727
Square array A(n, k), n, k >= 0, read by antidiagonals: the binary expansion of A(n, k) contains the runs of consecutive 1's that appear both in the binary expansions of n and k.
2
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0
OFFSET
0,13
COMMENTS
We only consider maximal runs of one or more consecutive 1's (as counted by A069010) that completely match in binary expansions of n and k, not simply single common 1's.
LINKS
Rémy Sigrist, Colored representation of the table for n, k < 2^10 (where the hue is function of T(n, k); black pixels denote 0's)
FORMULA
A(n, k) = A(k, n).
A(n, 0) = 0.
A(n, n) = n.
A(n, 2*n) = 0.
A(n, k) <= A004198(n, k) (bitwise AND operator).
A(n, n+1) = A352729(n).
EXAMPLE
Table A(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 0 0 0 1 0 0 0 1 0 0 0 1 0 0
2| 0 0 2 0 0 0 0 0 0 0 2 0 0 0 0 0
3| 0 0 0 3 0 0 0 0 0 0 0 3 0 0 0 0
4| 0 0 0 0 4 4 0 0 0 0 0 0 0 0 0 0
5| 0 1 0 0 4 5 0 0 0 1 0 0 0 1 0 0
6| 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0
7| 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0
8| 0 0 0 0 0 0 0 0 8 8 8 8 0 0 0 0
9| 0 1 0 0 0 1 0 0 8 9 8 8 0 1 0 0
10| 0 0 2 0 0 0 0 0 8 8 10 8 0 0 0 0
11| 0 0 0 3 0 0 0 0 8 8 8 11 0 0 0 0
12| 0 0 0 0 0 0 0 0 0 0 0 0 12 12 0 0
13| 0 1 0 0 0 1 0 0 0 1 0 0 12 13 0 0
14| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 0
15| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15
PROG
(PARI) A352724(n) = { my (r=[], o=0); while (n, my (v=valuation(n+n%2, 2)); if (n%2, r=concat(r, (2^v-1)*2^o)); o+=v; n\=2^v); r }
A(n, k) = vecsum(setintersect(A352724(n), A352724(k)))
CROSSREFS
KEYWORD
nonn,base,tabl
AUTHOR
Rémy Sigrist, Mar 30 2022
STATUS
approved