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.

A339098 Square array T(n,k), n >= 2, k >= 2, read by antidiagonals, where T(n,k) is the number of (undirected) cycles on the n X k king graph.

Original entry on oeis.org

7, 30, 30, 85, 348, 85, 204, 3459, 3459, 204, 451, 33145, 136597, 33145, 451, 954, 316164, 4847163, 4847163, 316164, 954, 1969, 3013590, 171903334, 545217435, 171903334, 3013590, 1969, 4008, 28722567, 6109759868, 61575093671, 61575093671, 6109759868, 28722567, 4008
Offset: 2

Views

Author

Seiichi Manyama, Nov 27 2020

Keywords

Examples

			Square array T(n,k) begins:
    7,     30,        85,         204,            451, ...
   30,    348,      3459,       33145,         316164, ...
   85,   3459,    136597,     4847163,      171903334, ...
  204,  33145,   4847163,   545217435,    61575093671, ...
  451, 316164, 171903334, 61575093671, 21964731190911, ...
		

Crossrefs

Rows and columns 2..5 give A339196, A339197, A339198, A339199.
Main diagonal gives A234622.

Programs

  • Python
    # Using graphillion
    from graphillion import GraphSet
    def make_nXk_king_graph(n, k):
        grids = []
        for i in range(1, k + 1):
            for j in range(1, n):
                grids.append((i + (j - 1) * k, i + j * k))
                if i < k:
                    grids.append((i + (j - 1) * k, i + j * k + 1))
                if i > 1:
                    grids.append((i + (j - 1) * k, i + j * k - 1))
        for i in range(1, k * n, k):
            for j in range(1, k):
                grids.append((i + j - 1, i + j))
        return grids
    def A339098(n, k):
        universe = make_nXk_king_graph(n, k)
        GraphSet.set_universe(universe)
        cycles = GraphSet.cycles()
        return cycles.len()
    print([A339098(j + 2, i - j + 2) for i in range(9 - 1) for j in range(i + 1)])

Formula

T(n,k) = T(k,n).