I came up with a recursive formula for a problem I was working on. It is as follows. $$a_n = \Big(\frac{1-q^{f \cdot n}}{1-q^n}\Big)\displaystyle\Big(1+\sum_{i=0}^{n-1}\binom{n}{i}p^{n-i}q^ia_i\Big)$$
Here $a_0 = 0$ $p, q\in [0,1],$ $p + q = 1,$ and $f$ is a positive integer. Is there anyway to give a closed form solution to this equation?
Off the top of my head this seems related to Bell Numbers.
Other thought were to try setting $$\alpha(n) = \frac{1-q^{f \cdot n}}{1-q^n}$$ and then simplifying $$\frac{a_n}{\alpha(n)} - p\cdot\frac{a_{n-1}}{\alpha(n-1)}$$ using $$\binom{n}{k} = \binom{n-1}{k} + \binom{n-1}{k-1}.$$ I think I keep getting errors, but this should give something close to $$\frac{a_n}{\alpha(n)} - p\cdot\frac{a_{n-1}}{\alpha(n-1)} = (1-p) + n\cdot p^1q^{n-1}a_{n-1} + \displaystyle\sum_{i=0}^{n-2}\binom{n-i}{i}p^{n-i}q^ia_i.$$
I think $$\displaystyle\sum_{i=0}^{n-2}\binom{n-i}{i}p^{n-i}q^ia_i = p\cdot\displaystyle\sum_{i=0}^{n-2}\binom{n-i}{i}p^{(n-1) - i}q^ia_i = p\Big(\frac{a_{n-i}}{\alpha(n)} - 1\Big).$$
I should then be able to stick this back in and solve.
However, I seem to get a different answer, and regardless, this still is far from being a closed form solution.
Any suggestions? Thank you!