login
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).
2
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,2
LINKS
Seiichi Manyama, Rows n = 1..9, flattened
EXAMPLE
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;
PROG
(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)])
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).
Sequence in context: A046276 A368516 A283614 * A003571 A068457 A299402
KEYWORD
nonn,tabf
AUTHOR
Seiichi Manyama, Mar 29 2020
STATUS
approved