
COMMENTS

A bicolored graph on n labeled vertices, k of which are black, and (nk) of which are white, can be represented as a k X (nk) matrix, where the (i,j) entry is 1 if the ith black vertex is adjacent to the jth white vertex, and 0 otherwise. Then, the graph is tangled if (1) the matrix does not have any rows or columns of all 0's or all 1's; and (2) it is not possible to permute the rows of the matrix and the columns of the matrix to obtain a matrix of the form
[ A  J ]
[+]
[ 0  B ]
where the top right block J consists of all 1's, and the bottom left block 0 consists of all 0's.


MATHEMATICA

terms = 23;
b[n_, i_] := b[n, i] = If[n == 0, {0}, If[i < 1, {}, Flatten @ Table[Map[ Function[{p}, p + j*x^i], b[n  i*j, i  1]], {j, 0, n/i}]]];
g[n_, k_] := g[n, k] = Sum[Sum[2^Sum[Sum[GCD[i, j]*Coefficient[s, x, i]* Coefficient[t, x, j], {j, 1, Exponent[t, x]}], {i, 1, Exponent[s, x]}]/ Product[i^Coefficient[s, x, i]*Coefficient[s, x, i]!, {i, 1, Exponent[s, x]}]/Product[i^Coefficient[t, x, i]*Coefficient[t, x, i]!, {i, 1, Exponent[t, x]}], {t, b[n + k, n + k]}], {s, b[n, n]}];
A[n_, k_] := g[Min[n, k], Abs[n  k]];
A[d_] := Sum[A[n, d  n], {n, 0, d}];
B[x_] = Sum[A[d] x^d, {d, 0, terms}];
T[x_] = 1  2x  1/B[x];
CoefficientList[T[x] + O[x]^terms, x] (* JeanFrançois Alcover, Jan 30 2019, after Alois P. Heinz in A049312 *)
