<s>[INST] How to express a power series in closed form I am trying to express the power series $x + x^4/4! + x^7/7! + \cdots$ in closed form;
I have already worked out the power series $1 + x^3/3! + x^6/6! + \cdots$ to be $(e^x + e^{x(2\pi i/3)} + e^{x(2\pi i/3)^2})/3$ using the roots of unity and the series for $e^x$ to get there, and I think I need to somehow "cycle" through to get to my desired closed form but I am not sure how to go about doing this.
Thanks!
 [/INST] Apologies to the two earlier answers, I made a typo - as they noticed - in my original question; the question now reflects what the closed form for $1 + x^3/3! + x^6/6! + \cdots$ should be. From that we can either integrate or differentiate twice to get my desired closed form for $x + x^4/4! + x^7/7! + \cdots$ as follows:

By integration:
Notice that the infinite sequence $x + x^4/4! + x^7/7! + \cdots = \int^x_0 1 + x^3/3! + x^6/6! + \cdots dx$
For efficiency, let $\omega=2\pi i/3$, then,
$$\int^x_0 1 + x^3/3! + x^6/6! + \cdots dx = \int^x_0 \frac 1 3 (e^x+e^{\omega x} + e^{\omega^2 x}) \, dx$$
$$=[e^x/3 +e^{\omega x}/3\omega +e^{\omega^2 x}/3\omega^2]^x_0$$
$$=e^x/3 +e^{\omega x}/3\omega +e^{\omega^2 x}/3\omega^2-1/3-1/3\omega-1/3\omega^2$$
$$=\omega^2e^x/3\omega^2+\omega e^{\omega x}/3\omega^2+e^{\omega^2 x}/3\omega^2-(\omega^2+\omega+1(1/3))$$
$$=\omega^2e^x/3\omega^2+\omega e^{\omega x}/3\omega^2+e^{\omega^2 x}/3 \omega^2$$

By differentiating twice:
Notice that the infinite sequence $$x + x^4/4! + x^7/7! + \cdots = d/dx(d/dx( 1 + x^3/3! + x^6/6! + \cdots ))$$
For efficiency, let $\omega=2\pi i/3$, then,
$$\frac d {dx} \left(\frac d {dx}( 1 + x^3/3! + x^6/6! + \cdots )\right) = \frac d {dx}\left(\frac d {dx} \left(\frac 1 3(e^x+e^{\omega x} + e^{\omega^2 x}) \right) \right)$$
$$= \frac d {dx}(e^x/3+\omega e^{\omega x}/3+\omega^2 e^{\omega^2 x}/3) = e^x/3+\omega^2e^{\omega x}/3 +\omega e^{\omega^2 x}/3$$

The answers from both are of course equivalent.
</s>