How can i find closed-form expression of generating function of this series?

Find closed-form expression of generating function of
$\langle 0,1,0,0,0,1,0,0,0,1,\ldots\rangle$

Any hints how can i find that?

Solutions Collecting From Web of "How can i find closed-form expression of generating function of this series?"

$$t+t^5+t^9+\cdots=\sum_{k=0}^\infty t^{4k+1}=t\sum_{k=0}^\infty (t^4)^k=\frac t{1-t^4}.$$

The generating function you are looking at is $$\sum_{k=0}^n \mathbb{1}_{k =1 [4] } t^k = \sum_{\substack{k=0 \\ k=1+4p, \ p \in \mathbb{N}}}^n t^k = \sum_{p=0}^{n/4} t^{1+4p} =t \sum_{p=0}^{\lfloor (n-1)/4 \rfloor} (t^4)^p = t \dfrac{t^{4 \lfloor (n-1)/4 \rfloor}-1}{t^4-1}$$

Then as $n$ goes to $\infty$ you get the generating function $$G(t)=\dfrac{t}{1-t^4}$$