|
|
A271507
|
|
Number of self-avoiding walks of any length from NW to SW corners on an n X n grid or lattice.
|
|
11
|
|
|
1, 2, 11, 178, 8590, 1246850, 550254085, 741333619848, 3046540983075504, 38141694646516492843, 1453908228148524205711098, 168707605740228097581729005751, 59588304533380500951726150179910606, 64061403305026776755367065417308840021540
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
MATHEMATICA
|
A271465 = Cases[Import["https://oeis.org/A271465/b271465.txt", "Table"], {_, _}][[All, 2]];
a[n_] := A271465[[2 n^2 - 2 n + 1]];
|
|
PROG
|
(Python)
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
if n == 1: return 1
universe = tl.grid(n - 1, n - 1)
GraphSet.set_universe(universe)
start, goal = 1, n
paths = GraphSet.paths(start, goal)
return paths.len()
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|