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

A333466 Number of self-avoiding closed paths on an n X n grid which pass through four corners ((0,0), (0,n-1), (n-1,n-1), (n-1,0)).

Original entry on oeis.org

1, 1, 11, 373, 44930, 17720400, 22013629316, 84579095455492
Offset: 2

Views

Author

Seiichi Manyama, Mar 22 2020

Keywords

Comments

a(11) = 36061721109572407840288. - Seiichi Manyama, Apr 07 2020

Examples

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

Crossrefs

Main diagonal of A333513.

Programs

  • Python
    # Using graphillion
    from graphillion import GraphSet
    import graphillion.tutorial as tl
    def A333466(n):
        universe = tl.grid(n - 1, n - 1)
        GraphSet.set_universe(universe)
        cycles = GraphSet.cycles()
        for i in [1, n, n * (n - 1) + 1, n * n]:
            cycles = cycles.including(i)
        return cycles.len()
    print([A333466(n) for n in range(2, 10)])
    
  • Ruby
    def search(x, y, n, used)
      return 0 if x < 0 || n <= x || y < 0 || n <= y || used[x + y * n]
      return 1 if x == 0 && y == 1 && [n - 1, n * (n - 1), n * n - 1].all?{|i| used[i] == true}
      cnt = 0
      used[x + y * n] = true
      @move.each{|mo|
        cnt += search(x + mo[0], y + mo[1], n, used)
      }
      used[x + y * n] = false
      cnt
    end
    def A(n)
      return 1 if n < 3
      @move = [[1, 0], [-1, 0], [0, 1], [0, -1]]
      used = Array.new(n * n, false)
      search(0, 0, n, used)
    end
    def A333466(n)
      (2..n).map{|i| A(i)}
    end
    p A333466(6)

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)

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

Original entry on oeis.org

1, 4, 47, 1843, 232905, 92729439, 115234959344, 442748883422394
Offset: 2

Views

Author

Seiichi Manyama, Mar 23 2020

Keywords

Comments

a(11) = 188829168009674568016545. - Seiichi Manyama, Apr 07 2020

Examples

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

Crossrefs

Programs

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

A333651 Triangle T(n,k), n >= 2, 0 <= k <= floor(n^2/2)-2, read by rows, where T(n,k) is the number of 2*(k+2)-cycles in the n X n grid graph which pass through NW corner (0,0).

Original entry on oeis.org

1, 1, 2, 4, 1, 2, 6, 18, 40, 24, 6, 1, 2, 6, 20, 72, 248, 698, 1100, 1096, 662, 206, 1, 2, 6, 20, 74, 298, 1228, 4762, 15984, 40026, 75524, 109150, 121130, 99032, 51964, 11996, 1072, 1, 2, 6, 20, 74, 300, 1300, 5844, 26148, 110942, 427388, 1393796, 3790524, 8648638, 16727776, 27529284, 38120312, 43012614, 37385280, 23166526, 9496426, 2286972, 242764
Offset: 2

Views

Author

Seiichi Manyama, Apr 01 2020

Keywords

Examples

			T(3,0) = 1;
   +--*
   |  |
   *--*
T(3,1) = 2;
   +--*--*   +--*
   |     |   |  |
   *--*--*   *  *
             |  |
             *--*
T(3,2) = 4;
   +--*--*   +--*--*   +--*--*   +--*
   |     |   |     |   |     |   |  |
   *     *   *  *--*   *--*  *   *  *--*
   |     |   |  |         |  |   |     |
   *--*--*   *--*         *--*   *--*--*
Triangle starts:
===================================================
n\k| 0  1  2   3   4    5     6 ...     10 ...  16
---|-----------------------------------------------
2  | 1;
3  | 1, 2, 4;
4  | 1, 2, 6, 18, 40,  24,    6;
5  | 1, 2, 6, 20, 72, 248,  698, ... , 206;
6  | 1, 2, 6, 20, 74, 298, 1228, .......... , 1072;
7  | 1, 2, 6, 20, 74, 300, 1300, ...
8  | 1, 2, 6, 20, 74, 300, 1302, ...
9  | 1, 2, 6, 20, 74, 300, 1302, ...
		

Crossrefs

Programs

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

Formula

T(n,k) = A034010(k+2) for k <= n-2.

A333439 a(n) = A333438(n)/2.

Original entry on oeis.org

2, 8, 98, 4112, 532270, 212372938, 263708907212, 1013068026356376, 11955420069208095720, 432101605951906251627394, 47778407166747833830058004150, 16149888968763663448192636077980754, 16675786862526496319891707194153887550752, 52568166380872328447478940416604864445574575710
Offset: 2

Views

Author

Seiichi Manyama, Mar 21 2020

Keywords

Crossrefs

Extensions

a(11) and a(13) from Seiichi Manyama
More terms from Ed Wynn, Jun 29 2023
Showing 1-5 of 5 results.