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-9 of 9 results.

A120443 Number of (undirected) Hamiltonian paths in the n X n grid graph.

Original entry on oeis.org

1, 4, 20, 276, 4324, 229348, 13535280, 3023313284, 745416341496, 730044829512632, 786671485270308848, 3452664855804347354220, 16652005717670534681315580, 331809088406733654427925292528, 7263611367960266490262600117251524
Offset: 1

Views

Author

David Bevan, Jul 19 2006

Keywords

Examples

			From _Robert FERREOL_, Apr 03 2019: (Start)
a(3) = 20:
there are 4 paths similar to
  + - + - +
          |
  + - + - +
  |
  + - + - +
8 paths similar to
  + - + - +
  |       |
  +   + - +
  |   |
  +   + - +
and 8 paths similar to
  + - + - +
  |       |
  +   +   +
  |   |   |
  +   + - +
(End)
		

Crossrefs

Formula

a(n) = A096969(n) / 2 for n > 1.

Extensions

More terms from Jesper L. Jacobsen (jesper.jacobsen(AT)u-psud.fr), Dec 12 2007

A000532 Number of Hamiltonian paths from NW to SW corners in an n X n grid.

Original entry on oeis.org

1, 1, 2, 8, 86, 1770, 88418, 8934966, 2087813834, 1013346943033, 1111598871478668, 2568944901392936854, 13251059359839620127088, 145194816279817259193401518, 3524171261632305641165676374930, 182653259988707123426135593460533473
Offset: 1

Views

Author

Russ Cox, Mar 15 1996

Keywords

Comments

Number of walks reaching each cell exactly once.

Crossrefs

Extensions

More terms from Zhao Hui Du, Jul 08 2008
Edited by Franklin T. Adams-Watters, Jul 03 2009
Name clarified by Andrew Howroyd, Apr 10 2016

A121789 "Spanning Hamiltonian walks" on the square lattice (see Jensen web site for further information).

Original entry on oeis.org

2, 8, 34, 650, 12014, 1016492, 83761994, 32647369000, 12227920752840, 22181389298814376, 38166266554504010420, 323646210116765453608746, 2574827340090912815899810042, 102299512403818451392332665527950
Offset: 1

Views

Author

N. J. A. Sloane, Aug 30 2006

Keywords

Comments

Number of Hamiltonian paths in the graph P_{n+1} X P_{n+1} starting at any of the n+1 vertices on one side of the graph and terminating at any of the n+1 vertices on the opposite side. - Andrew Howroyd, Apr 10 2016

Crossrefs

A333323 Number of self-avoiding closed paths on an n X n grid which pass through NW and SE corners.

Original entry on oeis.org

1, 3, 42, 1799, 232094, 92617031, 115156685746, 442641690778179, 5224287477491915786, 188825256606226776728029, 20879416139356164466643759334, 7057757437924198729598570424130207, 7287699030020917172151307665469211016474, 22973720258279267139936821063450448822110219653
Offset: 2

Views

Author

Seiichi Manyama, Mar 23 2020

Keywords

Examples

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

Crossrefs

Programs

  • Python
    # Using graphillion
    from graphillion import GraphSet
    import graphillion.tutorial as tl
    def A333323(n):
        universe = tl.grid(n - 1, n - 1)
        GraphSet.set_universe(universe)
        cycles = GraphSet.cycles().including(1).including(n * n)
        return cycles.len()
    print([A333323(n) for n in range(2, 10)])

Extensions

a(11) from Seiichi Manyama, Apr 07 2020
a(10) and a(12)-a(15) from Vaclav Kotesovec, Aug 16 2022 (computed by Anthony Guttmann)

A288032 Number of (undirected) paths in the n X n grid graph.

Original entry on oeis.org

0, 12, 322, 14248, 1530196, 436619868, 343715004510, 766012555199052, 4914763477312679808, 91781780911712980966236, 5028368533802124263609489682, 813124448051069045700905179168520
Offset: 1

Views

Author

Eric W. Weisstein, Jun 04 2017

Keywords

Comments

Paths of length zero are not counted here. - Andrew Howroyd, Jun 10 2017

Crossrefs

Main diagonal of A288518.

Extensions

a(6)-a(12) from Andrew Howroyd, Jun 10 2017

A333509 Square array T(n,k), n >= 1, k >= 2, read by antidiagonals, where T(n,k) is the number of self-avoiding walks in the n X k grid graph which start at any of the n vertices on left side of the graph and terminate at any of the n vertices on the right side.

Original entry on oeis.org

1, 1, 8, 1, 16, 29, 1, 32, 95, 80, 1, 64, 313, 426, 195, 1, 128, 1033, 2320, 1745, 444, 1, 256, 3411, 12706, 16347, 6838, 969, 1, 512, 11265, 69662, 154259, 112572, 25897, 2056, 1, 1024, 37205, 381964, 1454495, 1859660, 752245, 95292, 4279
Offset: 1

Views

Author

Seiichi Manyama, Mar 25 2020

Keywords

Examples

			Square array T(n,k) begins:
    1,    1,      1,       1,        1, ...
    8,   16,     32,      64,      128, ...
   29,   95,    313,    1033,     3411, ...
   80,  426,   2320,   12706,    69662, ...
  195, 1745,  16347,  154259,  1454495, ...
  444, 6838, 112572, 1859660, 30549774, ...
		

Crossrefs

Columns k=2-3 give: A333510, A333511.
Rows n=1-3 give: A000012, A000079(n+1), 2*A082574(n+1)+1.
T(n,n) gives A121785(n-1).

Programs

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

A236753 Number of simple (non-intersecting) directed paths on the grid graph P_n X P_n.

Original entry on oeis.org

1, 28, 653, 28512, 3060417, 873239772, 687430009069, 1532025110398168, 9829526954625359697, 183563561823425961932572, 10056737067604248527218979485, 1626248896102138091401810358337184
Offset: 1

Views

Author

Jaimal Ichharam, Jan 30 2014

Keywords

Comments

This is the number of directed paths on P_n X P_n of any length and also includes one zero length path per vertex. - Andrew Howroyd, May 27 2017

Examples

			For n=2 there are 4 zero length paths (one for each vertex), 8 paths with 1 one edge, 8 paths with 2 edges and 8 paths with 3 edges, so a(2)=28. - _Andrew Howroyd_, May 27 2017
		

Crossrefs

Cf. A236690 (includes diagonal edges).

Formula

a(n) = 2*A288032(n) + n^2. - Andrew Howroyd, Jun 10 2017

Extensions

a(6) corrected and a(8) added from Jaimal Ichharam, Feb 13 2014
a(6)-a(8) corrected and a(9)-a(12) from Andrew Howroyd, May 27 2017

A121786 "Cow patches" on the square lattice (see Jensen web site for further information).

Original entry on oeis.org

1, 7, 160, 11408, 2522191, 1718769373, 3598611604598, 23098353998190640, 453839082673896579243, 27266319759961440667165921, 5005013940387988257218110301496, 2805250606288167736619664411164848668
Offset: 1

Views

Author

N. J. A. Sloane, Aug 30 2006

Keywords

Crossrefs

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
Showing 1-9 of 9 results.