login
Number of terms common to the binary expansions of m and n; a matrix by antidiagonals.
3

%I #5 Mar 30 2012 18:58:12

%S 1,0,0,1,1,1,0,1,1,0,1,0,2,0,1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,

%T 1,0,1,0,2,1,2,1,2,0,1,0,0,0,1,1,1,1,0,0,0,1,1,1,0,2,2,2,0,1,1,1,0,1,

%U 1,0,0,2,2,0,0,1,1,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,0,0,0,0,0,0,0

%N Number of terms common to the binary expansions of m and n; a matrix by antidiagonals.

%e Northwest corner (the antidiagonals can be read either

%e southwest or northeast, since the matrix is symmetric):

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

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

%e 1 1 2 0 1 1 2 0 1 1

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

%e 1 0 1 1 2 1 2 0 1 0

%e 0 1 1 1 1 2 2 0 0 1

%e 1 1 2 1 2 2 3 0 1 1

%e ...

%e 11 = 1 + 1*2 + 1*8 and 29 = 1 + 1*4 + 1*8 + 1*16,

%e so that T(11,29)=2.

%t d[n_] := IntegerDigits[n, 2];

%t t[n_] := Reverse[Array[d, 120][[n]]]

%t s[n_] := Position[t[n], 1]

%t t[m_, n_] := Length[Intersection[s[m], s[n]]]

%t TableForm[Table[t[m, n], {m, 1, 14},

%t {n, 1, 14}]] (* A206479 as a matrix *)

%t Flatten[Table[t[i, n + 1 - i], {n, 1, 14},

%t {i, 1, n}]] (* A206479 as a sequence *)

%t u = Table[t[n - 1, m], {n, 3, 16}, {m, 1, n - 2}];

%t TableForm[u] (* A206566 as a triangle *)

%t Flatten[u] (* A206566 as a sequence *)

%t v[n_] := Table[t[k, n + 1], {k, 1, n}]

%t Table[Count[v[n], 0], {n, 1, 100}] (* A115478 *)

%Y Cf. A206566, A115478.

%K nonn,tabl,base

%O 1,13

%A _Clark Kimberling_, Feb 09 2012