|
|
A333438
|
|
Number of self-avoiding walks of any length from NW corner to its adjacent points on an n X n grid or lattice.
|
|
3
|
|
|
4, 16, 196, 8224, 1064540, 424745876, 527417814424, 2026136052712752, 23910840138416191440, 864203211903812503254788, 95556814333495667660116008300, 32299777937527326896385272155961508, 33351573725052992639783414388307775101504, 105136332761744656894957880833209728891149151420
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(2) = 4;
S--E S E
| |
*--*
S S--*
| |
E E--*
a(3) = 16;
S--E S E S E--* S E--*
| | | | | |
*--* *--*--* * *
| |
*--*--*
S E S E--* S E--* S E
| | | | | | | |
* * * *--* *--* * * *--*
| | | | | | | |
*--* *--* *--* *--*--*
S S--* S--* S--*--*
| | | |
E E--* E * E *
| | | |
*--* *--*--*
S--*--* S--*--* S--* S--*--*
| | | |
E--*--* E *--* E *--* E--* *
| | | | | |
*--* *--*--* *--*
|
|
PROG
|
(Python)
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
universe = tl.grid(n - 1, n - 1)
GraphSet.set_universe(universe)
start, goal = 1, 2
paths = GraphSet.paths(start, goal)
return paths.len() * 2
print([A333438(n) for n in range(2, 10)])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
More terms from Ed Wynn, Jun 29 2023
|
|
STATUS
|
approved
|
|
|
|