The number of squares with vertices coming from the vertices of the $n$-dimensional hypercube $\{0,1\}^n$ is given by $$ 2^{n-3}\sum_{j=1}^{n} \binom{n}{j}\binom{n-j}{j}. $$ The $0$-indexed sequence begins $0, 0, 1, 6, 36, 200, 1120, 6272, 35392, 200832, 1145856, \dots$.
For example, when $n=4$, two of the 36 vertex sets are $$\begin{align} &\{(0,0,0,0), (0,1,0,1), (1,0,1,0), (1,1,1,1)\} \text{ and} \\ &\{(0,0,0,1), (1,0,0,1), (0,1,0,1), (1,1,0,1)\}. \end{align}$$
If we insist that one of the vertices is the origin, then the number of (restricted) squares is $$ a(n) = \frac{1}{2}\sum_{j=1}^{n} \binom{n}{j}\binom{n-j}{j}, $$ which is also the number of "humps" over all length-$n$ Motzkin paths, defined below.
The $0$-indexed sequence begins $0, 0, 1, 3, 9, 25, 70, 196, 553, 1569, 4476, \dots$.
For example, for $n = 4$, the $9$ vertex sets are: $$ \{(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)\} \\ \{(0,0,0,0),(0,1,1,0),(1,0,0,1),(1,1,1,1)\}. $$
A length-$n$ Motzkin path is a lattice path from $(0,0)$ to $(n,0)$ that never goes strictly below the $x$-axis, consisting of steps of the form $(1,1)$, $(1,0)$, or $(1,-1)$. A hump is an $(1,1)$-step followed by zero or more $(1,0)$-steps, followed by a $(1,-1)$ step.
For example, there are nine length-$4$ Motzkin paths, illustrated below, with $1 + 1 + 2 + 1 + 1 + 1 + 1 + 1 + 0 = 9$ humps in total.
Are there any known bijections between origin-containing squares in the $n$-cube and humps in length-$n$ Motzkin paths? If not, can one be constructed simply?
