How to jump directly from level 0 to level 5 in a Gaussian pyramid without having the levels 1, 2, 3, and 4?
$w$ is effectively defined by $$g_l(i,j) = \sum_{m=-2}^2 \sum_{n=-2}^2 w(m,n) g_{l-1}(2i+m, 2j+n)$$ and $h_l$ by $$g_l(i,j) = \sum_{m=-M_l}^{M_l} \sum_{n=-M_l}^{M_l} h_l(m,n) g_0(i2^l+m, j2^l + n)$$
Some straightforward substitution of the second into the first gives
$$\sum_{m_l=-M_l}^{M_l} \sum_{n_l=-M_l}^{M_l} h_l(m_l,n_l) g_0(2^l i+m_l, 2^l j + n_l) = \\
\sum_{m=-2}^2 \sum_{n=-2}^2 w(m,n) \sum_{m'=-M_{l-1}}^{M_{l-1}} \sum_{n'=-M_{l-1}}^{M_{l-1}} h_{l-1}(m',n') g_0(2^l i+2^{l-1}m+m', 2^l j+2^{l-1}n + n')$$
We conclude firstly that
$M_l = 2^l + M_{l-1}$, and since $M_1 = 2$ (and $h_1 = w$), we have $M_l = 2^{l+1}-2$. Secondly, that

$$h_l(m_l, n_l) = \sum_{\substack{-2 \le m \le 2 \\ |m_l - 2^{l-1}m| \le M_{l-1}}} \sum_{\substack{-2 \le n \le 2 \\ |n_l - 2^{l-1}n| \le M_{l-1}}} w(m,n) h_{l-1}(m_l - 2^{l-1}m, n_l - 2^{l-1}n)$$
by identification of weights of the same pixel of $g_0$.