A086265 Numerators of mean number of s-clusters in an n X n (0,1)-matrix.
1, 17, 897, 168529, 118183389
Offset: 1
Examples
1/2, 17/16, 897/512, 168529/65536, 118183389/33554432...
Links
- Eric Weisstein's World of Mathematics, s-Cluster
Crossrefs
Cf. A002416.
Programs
-
Mathematica
For[n = 1, n <= 5, n++, cnt = 0; For[ii = 0, ii <= 2^(n^2), ii++, A = Partition[IntegerDigits[ii, 2, n^2], n]; G = EmptyGraph[n^2]; deleteG = 0; vert = {0, -1}; horiz = {-1, 0}; For[i = 1, i <= n, i++, For[j = 1, j <= n, j++, If[A[[i, j]] == 1, For[k = 1, k <= 2, k++, If[A[[i + vert[[k]], j + horiz[[k]]]] == 1, G = AddEdge[G, {j + (i - 1) n, j + horiz[[k]] + (i - 1) n + n vert[[k]]}]; ] ], deleteG++; ] ] ]; CC = ConnectedComponents[G]; cnt += (Length[CC] - deleteG); ]; Print[cnt] ] (* Luca Petrone, May 09 2018 *)
Extensions
a(5) from Luca Petrone, May 09 2018