<s>[INST] Coefficients of $(1+x+\dots+x^n)^3$? Consider the following polynomial:
$$ (1+x+\dots+x^n)^3 $$
The coefficients of the expansion for few values of $n$ ($n=1$ to $5$) are:
$$ 1, 3, 3, 1 $$
$$ 1, 3, 6, 7, 6, 3, 1 $$
$$ 1, 3, 6, 10, 12, 12, 10, 6, 3, 1 $$
$$ 1, 3, 6, 10, 15, 18, 19, 18, 15, 10, 6, 3, 1 $$
$$ 1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1 $$
Is there a closed-form formula for the $i$th element of this sequence (for different values of $n$)? 
Edit This looks similar to the sequence A109439 on OEIS corresponding to the coefficients of the expansion of: $ \left( \frac{1 - x^n}{1 - x} \right)^3 .$
 [/INST] Denote by
$$\sum_{k=0}^{3n}{\binom{3}{k}}_{n+1}x^{k}=(1 + x + ... + x^{n})^3\,$$ 
the expansion of multinomial of degree $n$
From that relation follow that 
$$ \sum_{k=0}^{3n)}{\binom{3}{k}}_{n+1}x^{k}=\left(\frac{1-x^{n+1}}{1-x}\right)^{3}=(1-x^{n+1})^{3}(1-x)^{-3}\,$$ 
from binomial formula we have
$$(1-x^{n+1})^{3}=\sum_{i=0}^{3}(-1)^{i}\binom{3}{i}x^{(n+1)i}$$ 
and from Taylor formula 
$$(1-x)^{-3}=\sum_{j=0}^{\infty}\binom{2+j}{j}x^{j}$$ 
after substitutions we get 
$$ \sum_{k=0}^{\infty}{\binom{3}{k}}_{n+1}x^{k}=\sum_{i=0}^{3}(-1)^{i}\binom{3}{i}x^{(n+1)i}\sum_{j=0}^{\infty}\binom{2+j}{j}x^{j}=$$ 
$$=\sum_{j=0}^{\infty}\sum_{i=0}^{3}(-1)^{i}\binom{3}{i}\binom{2+j}{j}x^{(n+1)i+j}=$$ 
$$ =\sum_{k=0}^{\infty}\sum_{i=0}^{3}(-1)^{i}\binom{3}{i}\binom{2+k-(n+1)i}{2}x^{k}\,$$ 
then equate the coefficients next to x follow formula 
$${\binom{3}{k}}_{(n+1)}=\sum_{i=0}^{3}(-1)^{i}\binom{3}{i}\binom{2+k-(n+1)i}{2}\,$$ 
formula for computing the coefficients of expansion
</s>