Given a natural number $n$ and define $B_n$ as the set of all sequences $b_1, b_2, \dots, b_n$ of length $n$ such that $b_1 = 1$ and for every $i = 1, 2, \dots, n-1$, then we have $$ b_{i+1} - b_i \in \{ 1 , -1, -3, -5, -7, \dots \} $$Where $b_i > 0$ for all $i$. Find a closed form of $|B_n|$.
We can easly see (say by induction) that $b_n\leq n$ for all $n$.
So if we say $[e_2,e_4,...,e_{2n}]$ are all possible outcomes for $b_{2n}$ to be $2,4,...2n$ and $(o_1,o_3,...,o_{2n-1})$ are all possible outcomes for $b_{2n-1}$ to be $1,3,...,2n-1$ then we have a following chain:
$$(1)\to [1]\to (1,1)\to [2,1]\to (3,3,1)\to [7,4,1]\to$$ $$\to (12,12,5,1)\to [30,18,6,1]\to (55,55,25,7,1) \to...$$
so $|B_n|\in \{1,1,2,3,7,12,30,55,143,...\}$, but no closed form. Any idea how to find it?
Edit: So, writen number at a vertex $V$ is a number of paths (only going up or right) from red vertex to the vertex $V$.
Let us consider walks on an integer lattice starting at $(0,0)$, where each step is one unit up or right, and which stay at or above the line $y=2x$. Each step either increases the quantity $y-2x$ by $1$ or decreases it by $2$, and this quantity must always be nonnegative. According to the generalized ballot theorem, the number of such walks which end at $(a,b)$ is
$$ \frac{b+1-2a}{a+b+1}\binom{a+b+1}{b+1}=\binom{a+b+1}{b+1}-3\binom{a+b}{b+1} $$
We can break such a walk into portions of the form $(\to,\to,\dots,\to,\uparrow)$, consisting of $k$ right steps followed by a single up step. Such a sequence increases the quantity $y-2x$ by $1-2k$, which can be $1,-1,-3,-5,\dots$ etc. This is the connection to your problem; the number of walks which have exactly $n$ up steps corresponds exactly to $|B_{n+1}|$. To count walks with exactly $b$ up steps and any number of right steps, we sum over all possible values of $a$ in the above formula. If $b$ is even, then $a$ can go as high as $b/2$, so the number of walks is \begin{align} \sum_{a=0}^{b/2}\binom{a+b+1}{b+1}-3\binom{a+b}{b+1} &=\binom{\frac32b+2}{b+2}-3\binom{\frac32b+1}{b+2} =\frac1{b+1}\binom{\frac32b+1}{b} %\\&=\binom{\frac32b+2}{\frac12b}-3\binom{\frac32b+1}{\frac12 b-1} %\\&=\binom{\frac32b+2}{\frac12b}-3\cdot \frac{\frac12b}{\frac32b +2}\binom{\frac32b+2}{\frac12 b} %\\&=\frac{2}{\frac32b+2}\binom{\frac32b+2}{\frac12b} %\\&=\frac{2}{b+2}\binom{\frac32b+1}{\frac12b} \end{align} The first equality follows from two applications of the hockey stick identity, while the latter can be verified by converting everything to factorials. Therefore, when $n$ is odd, $|B_n|$ is the result of the substituting $n-1$ in the above formula, so
$$ |B_n|=\frac1n\binom{(3n-1)/2}{n-1}.\tag{$n\text{ is odd}$} $$
You can verify $|B_1|=\frac11\binom10=1,|B_3|=\frac13\binom42=2,|B_5|=\frac15\binom{7}3=7,$ etc.
When $b$ is odd, the highest $a$ can go is $(b-1)/2$, so we instead get
\begin{align} \sum_{a=0}^{(b-1)/2}\binom{a+b+1}{b+1}-3\binom{a+b}{b+1} =\binom{\frac32b+\frac32}{b+2}-3\binom{\frac32b+\frac12}{b+2}=\frac1{b+2}\binom{\frac32(b+1)}{\frac12(b+1)} \end{align} so that
$$ |B_n|=\frac1{n+1}\binom{\frac32 n}{\frac12 n}.\tag{$n\text{ is even}$} $$
There is also a generating function solution. Let $a_n$ be the number of lattice walks from $(0,0)$ to $(n,2n)$ which stay at or above the line $y=2x$. With the previous discussion and some thought, $a_n=|B_{2n}|$. We will derive a generating function for $a_n$, and handle $|B_{2n+1}|$ separately later.
Define the elevation of a point $(x,y)$ to be the quantity $y-2x$. Our lattice walks always have a nonnegative elevation. A nonempty walk $W$ can uniquely be decomposed as a concatenation $$ W=W_1+\uparrow+W_2+\uparrow+W_3+\rightarrow $$ where
$W_1$ is the portion of the path up until the last time before reaching $(n,2n)$ that the walk has an elevation of $0$.
$W_2$ is the portion of the walk after $W_2$, and up until the last time it has an elevation of $1$.
$W_3$ is the portion of the walk after $W_3$, and up until the last time it has an elevation of $2$.
This implies that whenever $n>0$, we have that $$ a_n = \sum_{i+j+k=n-1}a_ia_ja_k $$ since $a_i,a_j,a_k$ represent the number of ways to choose $W_1,W_2,W_3$. (Compare and contrast this analysis to the Catalan numbers, $C_n$, where each path $C$ can be uniquely decomposed as $C=C_1+\uparrow+C_2+\to$, which gives the recurrence $C_n=\sum_{i+j=n-1}C_iC_j$, giving the generating function for $C_n$).
Letting $A(x)=\sum_{n\ge 0} a_nx^n$, and using the base case $a_0=0$, this gives the generating function equation $$ A(x)=1+xA(x)^3 $$ This does let us solve for $A(x)$, but it is quite messy. Fortunately, using Lagrange inversion, you can recover $a_n=\frac1{2n+1}\binom{3n}n$.
To find $|B_{2n+1}|$, let $d_n$ be the number of walks from $(0,0)$ to $(n,2n+1)$, and note that $d_n=|B_{2n+1}|$. By considering the last time the walk has an elevation of $0$, you can derive that $$ d_n=\sum_{k=0}^n a_ka_{n-k}, $$ so that $D(x)=\sum_{n\ge 0}d_nx^n$ satisfies $D(x)=A(x)^2$. Using our generating function equation for $A(x)$, we get that $$ D(x)^{1/2} = 1+xD(x)^{3/2} $$ You can then probability use Lagrange inversion to recover $d_n$. I am not quite experienced with Lagrange inversion, so I am not sure about the details here.