A333513 Square array T(n,k), n >= 2, k >= 2, read by antidiagonals, where T(n,k) is the number of self-avoiding closed paths on an n X k grid which pass through four corners ((0,0), (0,k-1), (n-1,k-1), (n-1,0)).
1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 7, 11, 7, 1, 1, 17, 49, 49, 17, 1, 1, 41, 229, 373, 229, 41, 1, 1, 99, 1081, 3105, 3105, 1081, 99, 1, 1, 239, 5123, 26515, 44930, 26515, 5123, 239, 1, 1, 577, 24323, 227441, 674292, 674292, 227441, 24323, 577, 1
Offset: 2
Examples
Square array T(n,k) begins: 1, 1, 1, 1, 1, 1, ... 1, 1, 3, 7, 17, 41, ... 1, 3, 11, 49, 229, 1081, ... 1, 7, 49, 373, 3105, 26515, ... 1, 17, 229, 3105, 44930, 674292, ... 1, 41, 1081, 26515, 674292, 17720400, ...
Links
- Seiichi Manyama, Antidiagonals n = 2..15, flattened
Crossrefs
Programs
-
Python
# Using graphillion from graphillion import GraphSet import graphillion.tutorial as tl def A333513(n, k): universe = tl.grid(n - 1, k - 1) GraphSet.set_universe(universe) cycles = GraphSet.cycles() for i in [1, k, k * (n - 1) + 1, k * n]: cycles = cycles.including(i) return cycles.len() print([A333513(j + 2, i - j + 2) for i in range(11 - 1) for j in range(i + 1)])
Formula
T(n,k) = T(k,n).