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
KEYWORD
nonn,tabf
AUTHOR
Seiichi Manyama, Mar 29 2020
STATUS
approved