In Mathematica I give input for generating function:
Series[Exp[x + x^2/2], {x, 0, 6}]
It gives output:
$$1 + x + x^2 + \frac{2x^3}{3} + \frac{5x^4}{12} + \frac{13x^5}{60} + \frac{19x^6}{180} + O(x)^{7}$$
But in particular I am interested in the coefficients of the output of
Series[Exp[x + x^2/2 + x^3/3 + x^4/4 + ... + x^k/k]]
For some $k$.
Is there an efficient way to extract any particular coefficient of this output?
Write your function as
$$ F_k(x) = \prod_{j=1}^k \exp \left(\dfrac{x^j}{j} \right) $$
Thus $F_k(x) = F_{k-1}(x) \exp\left(\dfrac{x^k}{k}\right)$, and the coefficient of $x^m$ is
$$ [x^m] F_k(x) = \sum_{j=0}^{\lfloor m/k \rfloor} \dfrac{[x^{m-kj}]\; F_{k-1}(x)}{k^j j!}$$
Of course, for $m \le k$ the coefficient will be $1$, because $\sum_{j=1}^k x^j/j = -\ln(1-x) + O(x^{k+1})$. You may also find it amusing to show that $$[x^{k+1}]\; F_k(x) = \dfrac{k}{k+1}$$ and $$[x^{k+2}]\; F_k(x) = 1 - \dfrac{1}{k+1} - \dfrac{1}{k+2} $$ Hmmm, looks like a pattern emerging ... $$ [x^{k+j}]\; F_k(x) = 1 - \dfrac{1}{k+1} - \dfrac{1}{k+2} - \ldots - \dfrac{1}{k+j}\ \text{for}\ k \ge j-1$$ (these being the cases where only the terms for $j=0$ and $j=1$ occur in the recursive formula)