OFFSET
2,5
LINKS
Seiichi Manyama, Antidiagonals n = 2..13, flattened
M. Peto, Studies of protein designability using reduced models, Thesis, 2007.
FORMULA
T(n,k) = T(k,n).
EXAMPLE
Square array T(n,k) begins:
1, 1, 1, 1, 1, 1, ...
1, 4, 13, 44, 148, 498, ...
1, 13, 80, 549, 3851, 26499, ...
1, 44, 549, 7104, 104100, 1475286, ...
1, 148, 3851, 104100, 3292184, 100766213, ...
1, 498, 26499, 1475286, 100766213, 6523266332, ...
PROG
(Python)
# Using graphillion
from graphillion import GraphSet
def make_T_nk(n, k):
grids = []
for i in range(1, k + 1):
for j in range(1, n):
grids.append((i + (j - 1) * k, i + j * k))
if i < k:
grids.append((i + (j - 1) * k, i + j * k + 1))
for i in range(1, k * n, k):
for j in range(1, k):
grids.append((i + j - 1, i + j))
return grids
def A339849(n, k):
universe = make_T_nk(n, k)
GraphSet.set_universe(universe)
cycles = GraphSet.cycles(is_hamilton=True)
return cycles.len()
print([A339849(j + 2, i - j + 2) for i in range(11 - 1) for j in range(i + 1)])
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Seiichi Manyama, Dec 19 2020
STATUS
approved