2020.10.18
关于\(\dfrac{1}{(1-z)^c}\)的幂级数
首先,\(G(z)\dfrac{1}{1-z}\)表示\(\begin{aligned}\{\sum_{i=0}^ng_i\}\end{aligned}\)的生成函数
\(c=0,G_0(z)=1z^0+0z^1+0z^2+0z^3+\cdots\)
\(c=1,G_1(z)=1z^0+1z^1+1z^2+1z^3+\cdots\)
\(c=2,G_2(z)=1z^0+2z^1+3z^2+4z^3+\cdots\)
\(c=3,G_3(z)=1z^0+3z^1+6z^2+10z^3+\cdots\)
\(\cdots\cdots\cdots\cdots\cdots\cdots\cdots\)
容易发现,也很好证明\([z^n]G_c(z)=[z^{n-1}]G_c(z)+[z^n]G_{c-1}(z)\)
\(g(c,n)=g(c-1,n)+g(c,n-1)\)=从\((1,0)\)到\((c,n)\)的只能向右或向上走的方案数\(=\dbinom{c+n-1}{n}\)
\(\begin{aligned}\dfrac{1}{(1-z)^c}=\sum_{n\geq0}\dbinom{c+n-1}{n}\end{aligned}\)
一道题目
给定\(n,m,k\),定义\(\begin{aligned}\zeta(\{a_i\})=(m-\sum a_i)\prod((a_i+k)^2-k^2)\end{aligned}\)
求\(\begin{aligned}\sum\zeta(\{a_i\}),\forall a_i>0,\sum a_i \leq m\end{aligned}\)
\(\begin{aligned}G(z)&=\sum_{i\geq0}((i+k)^2-k^2)z^i\\&=\sum_{i\geq0}i^2z^i+2k\sum_{i\geq0}iz^i\\&=\dfrac{(z+1)z}{(1-z)^3}+\dfrac{2kz}{(1-z)^2}\end{aligned}\)
\(F(z)=\begin{aligned}\sum_{i\geq0}iz^i=\dfrac{z}{(1-z)^2}\end{aligned}\)
\(\begin{aligned}ANS&=\sum_{i=0^*}^m(m-i)[z^i]G(z)^n\\&=[z^m]F(z)G(z)^n\\&=[z^m]\dfrac{z}{(1-z)^2}\cdot \dfrac{z^n(1+2k+(1-2k)z)^n}{(1-z)^{3n}}\\&=[z^{m-n-1}](\sum_{i\geq0}\dbinom{3n+i+1}{i}z^i)(\sum_{i\geq0}\dbinom{n}{i}(1-2k)^i(1+2k)^{n-i}z^i)\end{aligned}\)
*:因为\(G(z)^n\)没有次数小于\(n\)的项,所以从\(0\)开始和从\(n\)开始一样。