A206479 Number of terms common to the binary expansions of m and n; a matrix by antidiagonals.
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, 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, 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
Offset: 1
Examples
Northwest corner (the antidiagonals can be read either SW or NE, since the matrix is symmetric): 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 1 2 0 1 1 2 0 1 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 2 1 2 0 1 0 0 1 1 1 1 2 2 0 0 1 1 1 2 1 2 2 3 0 1 1 ... 11 = 1 + 1*2 + 1*8 and 29 = 1 + 1*4 + 1*8 + 1*16, so that T(11,29)=2.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000 (first 141 antidiagonals, flattened)
Programs
-
Maple
f:= proc(m,n) local M,N,i; M:= convert(m,base,2); N:= convert(n,base,2); add(M[i]*N[i], i=1..min(nops(M),nops(N))) end proc: seq(seq(f(i,j-i),i=1..j-1),j=2..16); # Robert Israel, May 29 2025
-
Mathematica
d[n_] := IntegerDigits[n, 2]; t[n_] := Reverse[Array[d, 120][[n]]] s[n_] := Position[t[n], 1] t[m_, n_] := Length[Intersection[s[m], s[n]]] TableForm[Table[t[m, n], {m, 1, 14}, {n, 1, 14}]] (* A206479 as a matrix *) Flatten[Table[t[i, n + 1 - i], {n, 1, 14}, {i, 1, n}]] (* A206479 as a sequence *) u = Table[t[n - 1, m], {n, 3, 16}, {m, 1, n - 2}]; TableForm[u] (* A206566 as a triangle *) Flatten[u] (* A206566 as a sequence *) v[n_] := Table[t[k, n + 1], {k, 1, n}] Table[Count[v[n], 0], {n, 1, 100}] (* A115478 *)
Comments