A345340 The number of squares with vertices from the vertices of the n-dimensional hypercube.
0, 0, 1, 6, 36, 200, 1120, 6272, 35392, 200832, 1145856, 6566912, 37779456, 218050560, 1262030848, 7322034176, 42570760192, 247970693120, 1446799212544, 8453937692672, 49463868522496, 289761061240832, 1699288462655488, 9975342691254272, 58611909535989760
Offset: 0
Keywords
Examples
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
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).