<s>[INST] Finding a generating function of the sequence $(2,2,2,3,3,2,2,2,3,3...)$ I need to find generating function of sequence: $(2,2,2,3,3,2,2,2,3,3,2,2,2,3,3...)$
My attempt so far:
I tried splitting the sequence into 2 new sequences: $(2,2,2,0,0,2,2,2,0,0,...)$ and $(0,0,0,3,3,0,0,0,3,3...).$
Then I found that the generating function for the first sequence is: $(2+2x+2x^2)/(1-x^5)$, and for the second sequence: $(3x^3 / (1-x^4) + 3x^4/(1-x^5)$.
Then the answer is just the sum of these 2 sequences. Is this good?
 [/INST] It's periodic with period $5$, so start with
$$\frac{1}{1-x^5}$$
and the numerator is $2,2,2,3,3$, so
$$\frac{2+2x+2x^2+3x^3+3x^4}{1-x^5}$$
</s>