OFFSET
1,3
EXAMPLE
Square array T(n,k) begins:
1, 1, 1, 1, 1, ...
8, 16, 32, 64, 128, ...
29, 95, 313, 1033, 3411, ...
80, 426, 2320, 12706, 69662, ...
195, 1745, 16347, 154259, 1454495, ...
444, 6838, 112572, 1859660, 30549774, ...
PROG
(Python)
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A(start, goal, n, k):
universe = tl.grid(n - 1, k - 1)
GraphSet.set_universe(universe)
paths = GraphSet.paths(start, goal)
return paths.len()
def A333509(n, k):
if n == 1: return 1
s = 0
for i in range(1, n + 1):
for j in range(k * n - n + 1, k * n + 1):
s += A(i, j, k, n)
return s
print([A333509(j + 1, i - j + 2) for i in range(9) for j in range(i + 1)])
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Seiichi Manyama, Mar 25 2020
STATUS
approved