login
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

%I #17 Apr 02 2022 17:46:31

%S 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,

%T 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,

%U 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,6,0,0,0,2,0,0

%N 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.

%C 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.

%H Rémy Sigrist, <a href="/A352727/b352727.txt">Table of n, a(n) for n = 0..10010</a>

%H Rémy Sigrist, <a href="/A352727/a352727.png">Colored representation of the table for n, k < 2^10</a> (where the hue is function of T(n, k); black pixels denote 0's)

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F A(n, k) = A(k, n).

%F A(n, 0) = 0.

%F A(n, n) = n.

%F A(n, 2*n) = 0.

%F A(n, k) <= A004198(n, k) (bitwise AND operator).

%F A(n, n+1) = A352729(n).

%e Table A(n, k) begins:

%e n\k| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

%e ---+------------------------------------------------------

%e 0| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

%e 1| 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0

%e 2| 0 0 2 0 0 0 0 0 0 0 2 0 0 0 0 0

%e 3| 0 0 0 3 0 0 0 0 0 0 0 3 0 0 0 0

%e 4| 0 0 0 0 4 4 0 0 0 0 0 0 0 0 0 0

%e 5| 0 1 0 0 4 5 0 0 0 1 0 0 0 1 0 0

%e 6| 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0

%e 7| 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0

%e 8| 0 0 0 0 0 0 0 0 8 8 8 8 0 0 0 0

%e 9| 0 1 0 0 0 1 0 0 8 9 8 8 0 1 0 0

%e 10| 0 0 2 0 0 0 0 0 8 8 10 8 0 0 0 0

%e 11| 0 0 0 3 0 0 0 0 8 8 8 11 0 0 0 0

%e 12| 0 0 0 0 0 0 0 0 0 0 0 0 12 12 0 0

%e 13| 0 1 0 0 0 1 0 0 0 1 0 0 12 13 0 0

%e 14| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 0

%e 15| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15

%o (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 }

%o A(n,k) = vecsum(setintersect(A352724(n), A352724(k)))

%Y Cf. A004198, A069010, A352724, A352729.

%K nonn,base,tabl

%O 0,13

%A _Rémy Sigrist_, Mar 30 2022