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.

Showing 1-3 of 3 results.

A333580 Square array T(n,k), n >= 1, k >= 1, read by antidiagonals, where T(n,k) is the number of Hamiltonian paths in an n X k grid starting at the lower left corner and finishing in the upper right corner.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 4, 4, 1, 1, 1, 0, 8, 0, 8, 0, 1, 1, 1, 16, 20, 20, 16, 1, 1, 1, 0, 32, 0, 104, 0, 32, 0, 1, 1, 1, 64, 111, 378, 378, 111, 64, 1, 1, 1, 0, 128, 0, 1670, 0, 1670, 0, 128, 0, 1, 1, 1, 256, 624, 6706, 10204, 10204, 6706, 624, 256, 1, 1
Offset: 1

Views

Author

Seiichi Manyama, Mar 27 2020

Keywords

Examples

			Square array T(n,k) begins:
  1, 1,  1,   1,    1,     1,      1,      1, ...
  1, 0,  1,   0,    1,     0,      1,      0, ...
  1, 1,  2,   4,    8,    16,     32,     64, ...
  1, 0,  4,   0,   20,     0,    111,      0, ...
  1, 1,  8,  20,  104,   378,   1670,   6706, ...
  1, 0, 16,   0,  378,     0,  10204,      0, ...
  1, 1, 32, 111, 1670, 10204, 111712, 851073, ...
  1, 0, 64,   0, 6706,     0, 851073,      0, ...
		

Crossrefs

Rows n=1..10 (with 0 omitted) give: A000012, A000035, A011782(n-1), A014523, A014584, A333581, A333582, A333583, A333584, A333585.
T(2*n-1,2*n-1) gives A001184(n-1).
Cf. A271592.

Programs

  • Python
    # Using graphillion
    from graphillion import GraphSet
    import graphillion.tutorial as tl
    def A333580(n, k):
        if n == 1 or k == 1: return 1
        universe = tl.grid(n - 1, k - 1)
        GraphSet.set_universe(universe)
        start, goal = 1, k * n
        paths = GraphSet.paths(start, goal, is_hamilton=True)
        return paths.len()
    print([A333580(j + 1, i - j + 1) for i in range(12) for j in range(i + 1)])

Formula

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

A333863 Number of Hamiltonian paths in a 2*(2*n+1) X (2*n+1) grid starting at the upper left corner and finishing in the lower right corner.

Original entry on oeis.org

1, 16, 117204, 440051896440, 825830699757513748579, 769203260676279544212492116449800, 354179806054404909542325896762875458037457353029, 80433401895946253522491939742836167238530417144721958187080077425
Offset: 0

Views

Author

Seiichi Manyama, Apr 08 2020

Keywords

Crossrefs

Programs

  • Python
    # Using graphillion
    from graphillion import GraphSet
    import graphillion.tutorial as tl
    def A333863(n):
        universe = tl.grid(4 * n + 1, 2 * n)
        GraphSet.set_universe(universe)
        start, goal = 1, 2 * (2 * n + 1) ** 2
        paths = GraphSet.paths(start, goal, is_hamilton=True)
        return paths.len()
    print([A333863(n) for n in range(7)])

Formula

a(n) = A333580(2*(2*n+1), 2*n+1).

Extensions

More terms from Ed Wynn, Jun 28 2023

A333606 Number of directed Hamiltonian walks from NW to SW corners of a 10 X n grid.

Original entry on oeis.org

1, 1, 256, 1480, 117852, 1513468, 71154709, 1283569420, 47001928863, 1013346943033, 32440676063382, 771708613086275, 22928865477892898, 576390471202016758, 16424125813587374688, 425923820730159849603, 11854446538789342310672, 312866945593394069370317
Offset: 1

Views

Author

Seiichi Manyama, Mar 28 2020

Keywords

Crossrefs

Row n=10 of A271592.
Cf. A333585.

Programs

  • Python
    # Using graphillion
    from graphillion import GraphSet
    import graphillion.tutorial as tl
    def A271592(n, k):
        if k == 1: return 1
        universe = tl.grid(k - 1, n - 1)
        GraphSet.set_universe(universe)
        start, goal = 1, n
        paths = GraphSet.paths(start, goal, is_hamilton=True)
        return paths.len()
    def A333606(n):
        return A271592(10, n)
    print([A333606(n) for n in range(1, 8)])

Extensions

More terms from Ed Wynn, Jun 28 2023
Showing 1-3 of 3 results.