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.

A333759 Number of self-avoiding closed paths in the n X n grid graph which pass through all vertices on four (left, right, upper, lower) sides of the graph.

Original entry on oeis.org

1, 1, 11, 191, 11346, 2002405, 1112939654, 1878223479450
Offset: 2

Views

Author

Seiichi Manyama, Apr 04 2020

Keywords

Comments

a(11) = 152567999801505122456.

Examples

			a(2) = 1;
   +--+
   |  |
   +--+
a(3) = 1;
   +--+--+
   |     |
   +     +
   |     |
   +--+--+
a(4) = 11;
   +--+--+--+   +--+--+--+   +--+--+--+
   |        |   |        |   |        |
   +--*--*  +   +--*  *--+   +--*     +
         |  |      |  |         |     |
   +--*--*  +   +--*  *--+   +--*     +
   |        |   |        |   |        |
   +--+--+--+   +--+--+--+   +--+--+--+
   +--+--+--+   +--+--+--+   +--+--+--+
   |        |   |        |   |        |
   +  *--*--+   +  *--*  +   +     *--+
   |  |         |  |  |  |   |     |
   +  *--*--+   +  *  *  +   +     *--+
   |        |   |  |  |  |   |        |
   +--+--+--+   +--+  +--+   +--+--+--+
   +--+--+--+   +--+--+--+   +--+  +--+
   |        |   |        |   |  |  |  |
   +        +   +        +   +  *--*  +
   |        |   |        |   |        |
   +  *--*  +   +        +   +  *--*  +
   |  |  |  |   |        |   |  |  |  |
   +--+  +--+   +--+--+--+   +--+  +--+
   +--+  +--+   +--+  +--+
   |  |  |  |   |  |  |  |
   +  *--*  +   +  *  *  +
   |        |   |  |  |  |
   +        +   +  *--*  +
   |        |   |        |
   +--+--+--+   +--+--+--+
		

Crossrefs

Main diagonal of A333758.
Cf. A333466.

Programs

  • Python
    # Using graphillion
    from graphillion import GraphSet
    import graphillion.tutorial as tl
    def A333759(n):
        universe = tl.grid(n - 1, n - 1)
        GraphSet.set_universe(universe)
        cycles = GraphSet.cycles()
        points = [i for i in range(1, n * n + 1) if i % n < 2 or ((i - 1) // n + 1) % n < 2]
        for i in points:
            cycles = cycles.including(i)
        return cycles.len()
    print([A333759(n) for n in range(2, 10)])