OFFSET
0,2
LINKS
I. Jensen, Table of n, a(n) for n = 0..9 [from the Jensen link below; a(0)=1 prepended by Georg Fischer, Apr 03 2020]
I. Jensen, Series Expansions for Self-Avoiding Walks [Wayback Machine]
FORMULA
a(n) = A333685(n,n). - Seiichi Manyama, Apr 02 2020
EXAMPLE
From Seiichi Manyama, Apr 01 2020: (Start)
a(1) = 10;
S--*--* S--*--* S--* S--* S--*
| | | | |
+--* *--+--* +--* + *--+
| | | | |
*--E *--*--E E *--E *--*--E
S *--* S *--* S S S
| | | | | | | | |
* + * *--+ * * +--* *--+--* *--+
| | | | | | | | |
*--* E E *--* E E *--E
a(2) = 7056;
S--*--*--*--* S--*--*--*--* S--*--*--*--*
| | |
*--*--*--*--* *--*--*--*--* *--*--*--*--*
| | |
*--*--+ *--*--+ *--*--+
| | |
*--*--* *--* *--* *--*
| | | | |
*--*--*--*--E *--*--* E *--*--*--E
... and so on.
(End)
PROG
(Python)
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A121787(n):
if n == 0: return 1
universe = tl.grid(2 * n, 2 * n)
GraphSet.set_universe(universe)
start, goal = 1, (2 * n + 1) * (2 * n + 1)
paths = GraphSet.paths(start, goal).including((start + goal) // 2)
return paths.len()
print([A121787(n) for n in range(7)]) # Seiichi Manyama, Apr 01 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 30 2006
EXTENSIONS
a(0)=1 prepended by Seiichi Manyama, Apr 02 2020
STATUS
approved