What is the generating function for the number of ways to part an integer $n$ such that no summand will repeat more than 3 times?
For example: $n=6$ so we can part it like this: $1+1+1+3$ but not like this: $1+1+1+1+2$.
I think the parenthesis are: $(1)(1+x)(1+x+x^2)(1+x+x^2+x^3)$ each one represent a repetition of $0,1,2,3$. Is this right?
Or is it: $(1)(1+x^2)(1+x^3)(1+x^4)$?
The generating function you're looking for is: $$\prod_{i=1}^{\infty}\left(1+x^i+x^{2i}+x^{{\displaystyle \color{#f00}3i}}\right)$$
I will let you think why this is the answer? I will give you an example take $n=3$ the questions you have to answer are:
(In the product the coefficient of $x^4$ is only $3$ because we did not yet expand until $i=\color{#00f}4 $)
Now I invite you to expand the product without summing the exponent I mean when you have $x^i\cdot x^j$ just write it as $x^{i+j}$ and don't sum $i+j$ you will obtain: $$1+x^{\color{#0a0}1}+x^{1+1}+x^{2}+x^{\color{#0a0}{1+1+1}}+x^{\color{#0a0}{1+2}}+x^{\color{#0a0}3}+x^{1+1+1+1}+x^{1+1+2}+x^{2+2}+x^4 $$
Now I will answer the question why this is the right answer, when you expand the following product: $$\prod_{i=1}^{\infty}\left(1+x^i+x^{i+i}+x^{i+i+i}\right)$$
you will get : $$\cdots+x^{n_1+n_2+\cdots+n_k}+\cdots$$ where: $$ \begin{align} n_1&=i_1&\text{or}&&n_1=i_1+i_1&&\text{or}&&n_1=i_1+i_1+i_1\\ n_2&=i_2&\text{or}&&n_2=i_2+i_2&&\text{or}&&n_2=i_2+i_2+i_2\\ \cdots &\cdots\\ n_k&=i_k&\text{or}&&n_k=i_k+i_k&&\text{or}&&n_3=i_k+i_k+i_k \end{align} $$
so the number of times $x^n$ occurs in the expansion of this product is the number of possible writing of $n$ as sum of positive integers $i_k$ such that no one occurs more than $3$ times