cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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)).

This page as a plain text file.
%I A333668 #29 Apr 01 2020 20:34:20
%S A333668 1,1,1,4,6,1,12,58,156,146,1,24,244,1416,5435,12976,16654,7108,1072,1,
%T A333668 40,696,7076,47965,236628,873610,2348664,4335724,4958224,3407276,
%U A333668 1298704,205792
%N 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)).
%H A333668 Seiichi Manyama, <a href="/A333668/b333668.txt">Rows n = 2..9, flattened</a>
%F A333668 T(n,0) = 1.
%F A333668 T(n,1) = A046092(n-3).
%e A333668 T(4,1) = 4;
%e A333668    +--*--*--+   +--*--*--+   +--*--*--+   +--*  *--+
%e A333668    |        |   |        |   |        |   |  |  |  |
%e A333668    *--*     *   *     *--*   *        *   *  *--*  *
%e A333668       |     |   |     |      |        |   |        |
%e A333668    *--*     *   *     *--*   *  *--*  *   *        *
%e A333668    |        |   |        |   |  |  |  |   |        |
%e A333668    +--*--*--+   +--*--*--+   +--*  *--+   +--*--*--+
%e A333668 Triangle starts:
%e A333668 =================================================================
%e A333668 n\k| 0   1     2      3       4 ...       8 ...    12 ...     18
%e A333668 ---|-------------------------------------------------------------
%e A333668 2  | 1;
%e A333668 3  | 1;
%e A333668 4  | 1,  4,    6;
%e A333668 5  | 1, 12,   58,   156,    146;
%e A333668 6  | 1, 24,  244,  1416,   5435, ... , 1072;
%e A333668 7  | 1, 40,  696,  7076,  47965, ........... , 205792;
%e A333668 8  | 1, 60, 1590, 24960, 263770, ..................... , 4638576;
%o A333668 (Python)
%o A333668 # Using graphillion
%o A333668 from graphillion import GraphSet
%o A333668 import graphillion.tutorial as tl
%o A333668 def A333668(n):
%o A333668     universe = tl.grid(n - 1, n - 1)
%o A333668     GraphSet.set_universe(universe)
%o A333668     cycles = GraphSet.cycles()
%o A333668     for i in [1, n, n * (n - 1) + 1, n * n]:
%o A333668         cycles = cycles.including(i)
%o A333668     return [cycles.len(2 * k).len() for k in range(2 * n - 2, n * n // 2 + 1)]
%o A333668 print([i for n in range(2, 8) for i in A333668(n)])
%Y A333668 Row sums give A333466.
%Y A333668 Cf. A003763, A046092, A302337, A333651, A333652, A333667.
%K A333668 nonn,tabf
%O A333668 2,4
%A A333668 _Seiichi Manyama_, Apr 01 2020