How many sequences are there? I saw this problems in an combinatorics exam:
\begin{array}{l}For\;all\;n\geq0,\;find\;the\;number\;of\;integer\:sequences\;a_0,...,a_{2n}\;,\;a_0=a_{2n}=1\;\\and\;for\;all\;1\leq i\leq2n\;we\;have\;\frac{a_i}{a_{i-1}}\in\{\frac16,\frac23,\frac32,6\}\end{array}
It reminds me similar problems regarding Catalan numbers, but i didn't find a connection in this case.
Any help will be appriciated.

The hint of @TeresaLisbon is nice. We generalise the set
\begin{align*}
\left\{\frac{1}{2\cdot3},\frac{2}{3},\frac{3}{2},2\cdot 3\right\}
\end{align*}
and denoting with $[z^n]$ the coefficient of $z^n$ of a series we consider

\begin{align*}
\color{blue}{[x^0y^0]}&\color{blue}{\left(xy+\frac{x}{y}+\frac{y}{x}+\frac{1}{xy}\right)^{2n}}\\
&=[x^0y^0]\left(x\left(y+\frac{1}{y}\right)+\frac{1}{x}\left(y+\frac{1}{y}\right)\right)^{2n}\\
&=[x^0y^0]\left(x+\frac{1}{x}\right)^{2n}\left(y+\frac{1}{y}\right)^{2n}\\
&=\left([x^0]\frac{1}{x^{2n}}\left(1+x^{2}\right)^{2n}\right)^2\\
&=\left([x^{2n}]\sum_{j=0}^{2n}\binom{2n}{j}x^{2j}\right)^2\\
&\,\,\color{blue}{=\binom{2n}{n}^2}\tag{1}
\end{align*}
We conclude from (1) the number of valid sequences of length $2n+1$ is the square of the central binomial coefficient $\color{blue}{\binom{2n}{n}^2}$.

The Catalan number $C_n=\frac{1}{n+1}\binom{2n}{n}=\binom{2n}{n}-\binom{2n}{n-1}$ can be written as the difference of the central binomial coefficient with a shifted binomial coefficient. The relationship with (1) don't be to seem very close.
Lattice paths: Let's look at a graphic with lattice paths for small values $n=1$ and $n=2$ to better see what's going on.
                       
We consider logarithmically scaled axis with unit $2$ in $x$-direction and unit $3$ in $y$-direction.

*

*The top left part in grey shows an element $a_i=\left(2^2,3^6\right)$ and the four directed edges weighted with $\left\{6,\frac{3}{2},\frac{1}{6},\frac{2}{3}\right\}$ which point to a candidate $a_{i+1}$.


*The bottom blue part with element $a_j=\left(2^3,3^2\right)$ in the center shows all valid subsequences of length $2$ starting and ending in $a_j$. We start in $a_j$ and there are $4$ ways to make a step of length $1$ according to the grey part and then we go back to $a_j$. We obtain this way
\begin{align*}
\color{blue}{\binom{2n}{n}^2=\binom{2}{1}^2=4}
\end{align*}
valid paths and therefore $4$ valid sequences.


*The right-hand green part with element $a_k=\left(2^7,3^4\right)$ in the center shows all valid subsequences of length $4$ starting and ending in $a_k$. We see for instance there are $9$ valid paths starting in $a_k=\left(2^7,3^4\right)$ and ending in $\left(2^8,3^5\right)$ followed by one final step back to $a_k$.

*

*These $9$ paths are weighted with



\begin{align*}
\begin{array}{cccccc}
6&\frac{1}{6}&6&\qquad xy&\frac{1}{xy}&xy\\
\frac{2}{3}&\frac{3}{2}&6&\qquad\frac{x}{y}&\frac{y}{x}&xy\\
\frac{3}{2}&\frac{2}{3}&6&\qquad\frac{y}{x}&\frac{x}{y}&xy\\
\frac{1}{6}&6&6&\qquad xy&\frac{1}{xy}&xy\\
\\
\frac{3}{2}&6&\frac{2}{3}&\qquad \frac{y}{x}&xy&\frac{x}{y}\\
6&\frac{3}{2}&\frac{2}{3}&\qquad xy&\frac{x}{y}&\frac{y}{x}\\
\\
\frac{3}{2}&6&\frac{2}{3}&\qquad \frac{y}{x}&xy&\frac{x}{y}\\
\frac{2}{3}&6&\frac{3}{2}&\qquad \frac{x}{y}&xy&\frac{y}{x}\\
\\
6&6&\frac{1}{6}&\qquad xy&xy&\frac{1}{xy}
\end{array}
\end{align*}
and $4$ times this set of paths results in
\begin{align*}
\color{green}{\binom{2n}{n}^2=\binom{4}{2}^2=36}
\end{align*}
valid paths and therefore $36$ valid sequences.
