<s>[INST] Extracting sequence from generating function I was provided the following generating function, and was unsure how to use it. I have never seen an example where the function “involved” itself.
The generating function is
$F(z)^8$
Where
$$F(z)=z+z^6 F(z)^5+z^{11} F(z)^{10}+z^{16} F(z)^{15}+z^{21} F(z)^{20}$$
Any help appreciated
 [/INST] Use Lagrange inversion. From the functional equation that $F(z)$ satisfies, we get, by multiplying through by $z$,
$$
zF(z)=z^2\left(1+(zF(z))^5+(zF(z))^{10}+(zF(z))^{15}+(zF(z))^{20}\right).
$$
Thus,
$$
\frac{z}{1+z^5+z^{10}+z^{15}+z^{20}}\circ(zF(z))=z^2,
$$
so
$$
zF(z)=\left(\frac{z}{1+z^5+z^{10}+z^{15}+z^{20}}\right)^{\langle-1\rangle}\circ z^2,
$$
where "$\langle-1\rangle$" denotes the compositional inverse. Thus, $zF(z)$ is an even function, i.e. $zF(z)=H(z^2)$ for the invertible power series $H(z)=\left(\frac{z}{1+z^5+z^{10}+z^{15}+z^{20}}\right)^{\langle-1\rangle}$. This means that $H=H(z)$ satisfies the functional equation $H=z\varphi(H)$ for $\varphi(z)=1+z^5+z^{10}+z^{15}+z^{20}$. Note that $\varphi(0)\ne 0$. We need to find the coefficients of
$$
F(z)^8=\frac{H(z^2)^8}{z^8}=\frac{H(z)^8}{z^4}\circ z^2.
$$
By Lagrange inversion,
$$
[z^n]f(H(z))=\frac{1}{n}[z^{n-1}]\!\left(\varphi(z)^n f'(z)\right),
$$
where $[z^n]$ means the coefficient at $z^n$.
Here, $f(z)=z^8$, so $f'(z)=8z^7$, and we need essentially
\begin{multline*}
[z^n]\frac{H(z)^8}{z^4}=[z^{n+4}]H(z)^8=\frac{1}{n+4}[z^{n+3}]\!\left(8z^7\varphi(z)^{n+4}\right)=\\=\frac{8}{n+4}[z^{n-4}] (1+z^5+z^{10}+z^{15}+z^{20})^{n+4}.
\end{multline*}
And since $1+z^5+z^{10}+z^{15}+z^{20}=(1+z+z^2+z^3+z^4)\circ z^5$, only the terms where $n\equiv 4\pmod 5$ would be nonzero in the $[z^{n-4}] (1+z^5+z^{10}+z^{15}+z^{20})^{n+4}$. And since we are also composing with $z^2$ at the end, $F(z)^8$ will only have terms with powers congruent to $8\!\!\!\mod\!\!10$.
Finally, here is the pentanomial coefficient triangle. Scroll down to example, it's easier to see there.
</s>