cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A086265 Numerators of mean number of s-clusters in an n X n (0,1)-matrix.

Original entry on oeis.org

1, 17, 897, 168529, 118183389
Offset: 1

Views

Author

Eric W. Weisstein, Jul 14 2003

Keywords

Examples

			1/2, 17/16, 897/512, 168529/65536, 118183389/33554432...
		

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