login
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 NW and SE corners ((0,0),(n-1,n-1)).
4

%I #26 Apr 02 2020 04:31:52

%S 1,3,20,16,6,175,420,562,456,186,1764,8064,21224,39500,55376,57248,

%T 37586,10260,1072,19404,138600,569768,1717152,4151965,8371428,

%U 14126846,19364732,20241450,14759356,6998166,1927724,230440

%N 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 NW and SE corners ((0,0),(n-1,n-1)).

%H Seiichi Manyama, <a href="/A333667/b333667.txt">Rows n = 2..9, flattened</a>

%F T(n,0) = A000891(n-2).

%e T(3,0) = 3;

%e +--*--* +--*--* +--*

%e | | | | | |

%e *--* * * * * *--*

%e | | | | | |

%e *--+ *--*--+ *--*--+

%e Triangle starts:

%e =======================================================================

%e n\k| 0 1 2 ... 4 ... 8 ... 12 ... 18

%e ---|-------------------------------------------------------------------

%e 2 | 1;

%e 3 | 3;

%e 4 | 20, 16, 6;

%e 5 | 175, 420, 562, ... , 186;

%e 6 | 1764, 8064, 21224, .......... , 1072;

%e 7 | 19404, 138600, 569768, .................. , 230440;

%e 8 | 226512, 2265120, 12922446, ............................ , 4638576;

%o (Python)

%o # Using graphillion

%o from graphillion import GraphSet

%o import graphillion.tutorial as tl

%o def A333667(n):

%o universe = tl.grid(n - 1, n - 1)

%o GraphSet.set_universe(universe)

%o cycles = GraphSet.cycles().including(1).including(n * n)

%o return [cycles.len(2 * k).len() for k in range(2 * n - 2, n * n // 2 + 1)]

%o print([i for n in range(2, 8) for i in A333667(n)])

%Y Row sums give A333323.

%Y Cf. A003763, A302337, A333651, A333652, A333668.

%K nonn,tabf

%O 2,2

%A _Seiichi Manyama_, Apr 01 2020