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

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

Original entry on oeis.org

1, 2, 104, 111712, 2688307514, 1445778936756068, 17337631013706758184626, 4628650743368437273677525554148, 27478778338807945303765092195103685118924
Offset: 0

Views

Author

Don Knuth, Dec 07 1995

Keywords

Crossrefs

Formula

a(n) = A121788(2n), n>0. - Ashutosh Mehra, Dec 19 2008

Extensions

a(7)-a(8) copied from A121788 by Alois P. Heinz, Sep 27 2014

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)])
Showing 1-2 of 2 results.