I am trying to find a closed form formula for the following recursive function: $$f_n(h)= \sum_{i=1}^{n-1} \binom{n-2}{i-1} \cdot (0.5)^{n-2} \cdot [ (f_{n-i}(h-1)\cdot \sum_{j=0}^{h-1}f_i(j)) + (f_{i}(h-1)\cdot \sum_{j=0}^{h-2} f_{n-i}(j))] $$ The base cases are the following: $$ f_1(h)= \begin{cases} 1 & h=0 \\ 0 & otherwise \end{cases} \\ f_2(h)= \begin{cases} 1 & h=1\\ 0 & otherwise \end{cases} $$ I have been trying to use the generating functions technique, but I have been unsuccessful so far and I was wondering if anyone has suggestions into how to solve this problem. Thank you for your help in advance Edit: I added the base cases