%I #23 Apr 03 2020 01:31:17
%S 1,1,10,1,101,7056,1,1105,610765,462755440,1,12046,53968755,
%T 365962179700,2593165016903538,1,131399,4775133828,294346514811753,
%U 18855848354902159112,1243982213040307428318660
%N Triangle T(n,k), n>=0, 0 <= k <= n, read by rows, where T(n,k) is the number of self-avoiding paths in (2*n+1) X (2*k+1) grid starting the upper left corner, passing through the center of grid and finishing the lower right corner.
%F T(n,k) = T(k,n).
%e Triangle starts:
%e ====================================================================
%e n\k| 0 1 2 3 4
%e ---|----------------------------------------------------------------
%e 0 | 1;
%e 1 | 1, 10;
%e 2 | 1, 101, 7056;
%e 3 | 1, 1105, 610765, 462755440;
%e 4 | 1, 12046, 53968755, 365962179700, 2593165016903538;
%e 5 | 1, 131399, 4775133828, 294346514811753, ...
%e 6 | 1, 1433341, 422813081886, 237970057189444731, ...
%o (Python)
%o # Using graphillion
%o from graphillion import GraphSet
%o import graphillion.tutorial as tl
%o def A333685(n, k):
%o if n == 0 or k == 0: return 1
%o universe = tl.grid(2 * n, 2 * k)
%o GraphSet.set_universe(universe)
%o start, goal = 1, (2 * n + 1) * (2 * k + 1)
%o paths = GraphSet.paths(start, goal).including((start + goal) // 2)
%o return paths.len()
%o print([A333685(n, k) for n in range(6) for k in range(n + 1)])
%Y Columns k=0..2 give A000012, A333686, A333689.
%Y T(n,n) gives A121787.
%K nonn,tabl
%O 0,3
%A _Seiichi Manyama_, Apr 02 2020
|