Suppose that you have a generating function $$ f(q) = \sum_{k=0}^\infty a_k q^k $$ It's not too hard to obtain the generating function $$ f_{n,m}(q) = \sum_{k=0}^\infty a_{nk + m}q^k $$ by taking a creative sum of terms like $f(\zeta_n^i q)$ for appropriate roots of unity $\zeta_n$.
What about functions of the form $$ g(q) = \sum_{k=0}^\infty a_{k^2}q^k $$ or more generally, $$ g_{n,m}(q) = \sum_{k=0}^\infty a_{nk^2+m}q^k $$
Is there some way to nicely obtain these in terms of either the original generating function, or its coefficients, or anything? If it helps, the generating function that we are interested in question does satisfy someis the inverse of the modular propertiesdiscriminant. That is, we are looking at $$ f(q) = \frac{1}{\Delta(q)} = q^{-1} + 24 + 324q + 3200q^2 + \cdots $$ where $\Delta(q) = q\prod_{k=1}^\infty (1-q^k)^{24} = \eta(q)^{24}$.