OFFSET
0,4
FORMULA
a(n) = 2^(n-2) * Sum_{k=1..floor(n/2)} n!/(2*k!*k!*(n-2*k)!). - Drake Thomas, Jun 14 2021
a(n) = 2^(n-2) * A097861(n).
EXAMPLE
For n = 4, there are a(4) = 36 such squares, nine of which contain the origin:
(0,0,0,0),(0,0,0,1),(0,0,1,0),(0,0,1,1);
(0,0,0,0),(0,0,0,1),(0,1,0,0),(0,1,0,1);
(0,0,0,0),(0,0,0,1),(1,0,0,0),(1,0,0,1);
(0,0,0,0),(0,0,1,0),(0,1,0,0),(0,1,1,0);
(0,0,0,0),(0,0,1,0),(1,0,0,0),(1,0,1,0);
(0,0,0,0),(0,1,0,0),(1,0,0,0),(1,1,0,0);
(0,0,0,0),(0,0,1,1),(1,1,0,0),(1,1,1,1);
(0,0,0,0),(0,1,0,1),(1,0,1,0),(1,1,1,1); and
(0,0,0,0),(0,1,1,0),(1,0,0,1),(1,1,1,1).
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Kagey, Jun 14 2021
STATUS
approved