OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, s-Cluster
EXAMPLE
1/2, 17/16, 897/512, 168529/65536, 118183389/33554432...
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 *)
CROSSREFS
KEYWORD
nonn,frac,more
AUTHOR
Eric W. Weisstein, Jul 14 2003
EXTENSIONS
a(5) from Luca Petrone, May 09 2018
STATUS
approved