login
A333668
Triangle T(n,k), n >= 2, 0 <= k <= floor(n^2/2)-2*n+2, read by rows, where T(n,k) is the number of 2*(k+2*n-2)-cycles in the n X n grid graph which pass through four corners ((0,0), (0,n-1), (n-1,n-1), (n-1,0)).
4
1, 1, 1, 4, 6, 1, 12, 58, 156, 146, 1, 24, 244, 1416, 5435, 12976, 16654, 7108, 1072, 1, 40, 696, 7076, 47965, 236628, 873610, 2348664, 4335724, 4958224, 3407276, 1298704, 205792
OFFSET
2,4
LINKS
Seiichi Manyama, Rows n = 2..9, flattened
FORMULA
T(n,0) = 1.
T(n,1) = A046092(n-3).
EXAMPLE
T(4,1) = 4;
+--*--*--+ +--*--*--+ +--*--*--+ +--* *--+
| | | | | | | | | |
*--* * * *--* * * * *--* *
| | | | | | | |
*--* * * *--* * *--* * * *
| | | | | | | | | |
+--*--*--+ +--*--*--+ +--* *--+ +--*--*--+
Triangle starts:
=================================================================
n\k| 0 1 2 3 4 ... 8 ... 12 ... 18
---|-------------------------------------------------------------
2 | 1;
3 | 1;
4 | 1, 4, 6;
5 | 1, 12, 58, 156, 146;
6 | 1, 24, 244, 1416, 5435, ... , 1072;
7 | 1, 40, 696, 7076, 47965, ........... , 205792;
8 | 1, 60, 1590, 24960, 263770, ..................... , 4638576;
PROG
(Python)
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A333668(n):
universe = tl.grid(n - 1, n - 1)
GraphSet.set_universe(universe)
cycles = GraphSet.cycles()
for i in [1, n, n * (n - 1) + 1, n * n]:
cycles = cycles.including(i)
return [cycles.len(2 * k).len() for k in range(2 * n - 2, n * n // 2 + 1)]
print([i for n in range(2, 8) for i in A333668(n)])
CROSSREFS
Row sums give A333466.
Sequence in context: A079160 A230256 A362296 * A193293 A258220 A158391
KEYWORD
nonn,tabf
AUTHOR
Seiichi Manyama, Apr 01 2020
STATUS
approved