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.

Previous Showing 11-14 of 14 results.

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

A333520 Triangle read by rows: T(n,k) is the number of self-avoiding paths of length 2*(n-1+k) connecting opposite corners in the n X n grid graph (0 <= k <= floor((n-1)^2/2), n >= 1).

Original entry on oeis.org

1, 2, 6, 4, 2, 20, 36, 48, 48, 32, 70, 224, 510, 956, 1586, 2224, 2106, 732, 104, 252, 1200, 3904, 10560, 25828, 58712, 121868, 217436, 300380, 280776, 170384, 61336, 10180, 924, 5940, 25186, 88084, 277706, 821480, 2309402, 6140040, 15130410, 33339900, 62692432, 96096244, 116826664, 110195700, 78154858, 39287872, 12396758, 1879252, 111712
Offset: 1

Views

Author

Seiichi Manyama, Mar 29 2020

Keywords

Examples

			T(3,1) = 4;
   S--*      S--*--*   S  *--*   S
      |            |   |  |  |   |
   *--*         *--*   *--*  *   *  *--*
   |            |            |   |  |  |
   *--*--E      *--E         E   *--*  E
Triangle starts:
=======================================================
n\k|   0     1     2      3      4 ...      8 ...   12
---|---------------------------------------------------
1  |   1;
2  |   2;
3  |   6,    4,    2;
4  |  20,   36,   48,    48,    32;
5  |  70,  224,  510,   956,  1586, ... , 104;
6  | 252, 1200, 3904, 10560, ................. , 10180;
		

Crossrefs

Row sums give A007764.
T(n,0) gives A000984(n-1).
T(n,1) gives A257888(n).
T(n,floor((n-1)^2/2)) gives A121788(n-1).
T(2*n-1,2*(n-1)^2) gives A001184(n-1).

Programs

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

A375209 Number of simple symmetric Hamiltonian paths connecting opposite corners of a 2n+1 X 2n+1 grid.

Original entry on oeis.org

1, 2, 16, 564, 93866, 72054120, 260324223938, 4400423201461008, 349815282628284276844, 130501147375292529852604266, 228964256366276749773274186140858
Offset: 0

Views

Author

Nicolay Avilov, Oct 16 2024

Keywords

Examples

			a(2) = 16, see link "Illustration".
		

Crossrefs

Formula

a(n) = 2*A331001(2*n + 1) for n > 0. - Andrew Howroyd, Oct 16 2024

Extensions

Thanks to Suleiman Makarenko.
a(5)-a(10) from Andrew Howroyd, Oct 16 2024

A363577 Number of inequivalent Hamiltonian paths starting in the lower left corner of an n X n grid graph (paths differing only by rotations and reflections are regarded as equivalent).

Original entry on oeis.org

1, 1, 3, 23, 347, 10199, 683227, 85612967, 25777385143, 14396323278040, 19799561204761862, 50351228336401026361, 319210377672595552740369, 3736517399241599771428011100, 109790442395888863208285555153329, 5952238893391106787883489313797219949
Offset: 1

Views

Author

Lars Blomberg, Jun 10 2023

Keywords

Comments

Equivalently, number of inequivalent Hamiltonian paths starting in a corner of an n X n grid graph (paths differing only by rotations and reflections are regarded as equivalent). - Martin Ehrenstein, Jul 08 2023

Examples

			There are 3 paths for n=3:
  +--+--+    +--+--+    +--+  +
  |     |    |     |    |  |  |
  +  +  +    +  +--+    +  +  +
  |  |  |    |  |       |  |  |
  +  +--+    +  +--+    +  +--+
A fourth path:
  +--+--+
        |
  +--+  +
  |  |  |
  +  +--+
is the same as the second one in the row above after a 90-degree rotation.
All paths starting E are the same as the corresponding ones starting N after reflection in the forward diagonal.
		

Crossrefs

Extensions

a(1) added by N. J. A. Sloane, Jun 10 2023
a(8)-a(9) from Martin Ehrenstein, Jul 08 2023
a(10)-a(16) from Oliver R. Bellwood, Jun 06 2025
Previous Showing 11-14 of 14 results.