Skip to main content
5 of 5
added 8 characters in body
T. Amdeberhan
  • 43.2k
  • 5
  • 57
  • 217

This was an answer before the typo was edited by the OP on $Q_m^{n+1}=2Q_m^n+Q_{m-1}^{n-1}$.

Let $F(x,y)=\sum_{n,m\geq0}Q_n^mx^my^n$ be a generating function. Based on the recurrence relation alone, you should be getting $$F(x,y)=\frac{P(x,y)}{1-2y-xy^2};$$ for some polynomial $P(x,y)$ which depends on the initial conditions (this, I leave up to you).

Caveat. You last initial condition does not sync with the recurrence. For example, $Q(3,3)=2Q(3,2)+Q(2,1)=0$ but supposedly $Q(3,3)=1$ and $Q(3,2)=Q(2,1)=0$. A mismatch!

===============================

After the edit by OP: $Q_m^{n+1}=2Q_m^n+Q_{m-1}^n$. Again, let $F(x,y)=\sum_{n,m\geq0}Q_n^mx^my^n$ be a generating function. Based on the recurrence relation alone, you should be getting $$F(x,y)=\frac{P(x,y)}{1-2y-xy}=P(x,y)\sum_{n=0}^{\infty}(2+x)^ny^n =P(x,y)\sum_{m,n\geq0}\binom{n}m2^{n-m}x^my^n;$$ for some polynomial $P(x,y)$ which depends on the initial conditions ($P=1$, I think). Therefore, $Q_m^n=\binom{n}m2^{n-m}$.

T. Amdeberhan
  • 43.2k
  • 5
  • 57
  • 217