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.

A271592 Array read by antidiagonals: T(n,m) = number of directed Hamiltonian walks from NW to SW corners on a grid with n rows and m columns.

This page as a plain text file.
%I A271592 #14 Mar 28 2020 10:11:36
%S A271592 1,0,1,0,1,1,0,1,0,1,0,1,2,1,1,0,1,0,4,0,1,0,1,4,8,8,1,1,0,1,0,23,0,
%T A271592 16,0,1,0,1,8,55,86,47,32,1,1,0,1,0,144,0,397,0,64,0,1,0,1,16,360,948,
%U A271592 1770,1584,264,128,1,1,0,1,0,921,0,11658,0,6820,0,256,0,1
%N A271592 Array read by antidiagonals: T(n,m) = number of directed Hamiltonian walks from NW to SW corners on a grid with n rows and m columns.
%H A271592 Andrew Howroyd, <a href="/A271592/b271592.txt">Antidiagonals n = 1..27, flattened</a>
%F A271592 T(n,m)=0 for n odd and m even, T(1,n)=0 for n>1.
%F A271592 T(2,n)=T(n,1)=T(2*n,2)=1, T(3,2*n+1)=T(n+1,3)=2^n.
%e A271592 The start of the sequence as table:
%e A271592 * 1 0   0   0     0     0       0       0          0 ...
%e A271592 * 1 1   1   1     1     1       1       1          1 ...
%e A271592 * 1 0   2   0     4     0       8       0         16 ...
%e A271592 * 1 1   4   8    23    55     144     360        921 ...
%e A271592 * 1 0   8   0    86     0     948       0      10444 ...
%e A271592 * 1 1  16  47   397  1770   11658   59946     359962 ...
%e A271592 * 1 0  32   0  1584     0   88418       0    4999752 ...
%e A271592 * 1 1  64 264  6820 52387  909009 8934966  130373192 ...
%e A271592 * 1 0 128   0 28002     0 7503654       0 2087813834 ...
%e A271592 * ...
%o A271592 (Python)
%o A271592 # Using graphillion
%o A271592 from graphillion import GraphSet
%o A271592 import graphillion.tutorial as tl
%o A271592 def A271592(n, k):
%o A271592     if k == 1: return 1
%o A271592     universe = tl.grid(k - 1, n - 1)
%o A271592     GraphSet.set_universe(universe)
%o A271592     start, goal = 1, n
%o A271592     paths = GraphSet.paths(start, goal, is_hamilton=True)
%o A271592     return paths.len()
%o A271592 print([A271592(j + 1, i - j + 1) for i in range(12) for j in range(i + 1)])  # _Seiichi Manyama_, Mar 28 2020
%Y A271592 Column 4 is aerated A014524, column 5 is A014585.
%Y A271592 Rows include A181688, A181689.
%Y A271592 Main diagonal is A000532.
%Y A271592 Cf. A333580.
%K A271592 nonn,tabl
%O A271592 1,13
%A A271592 _Andrew Howroyd_, Apr 10 2016