<s>[INST] The probability of sum 5 after n time’s Assuming the die is unbiased, what is the probability of getting sum of 5 after $n$ time (use only one cube at a time).
It's clear to me that more than 5 time is wrong.(Because the lowest number is $1$ so $1+1+1+1+1$ is $\max$) 
I tried this way: $\frac{1}{6}+\frac{4}{6}*\frac{1}{6}…$
First time only 5 is ok,in the second time 4 possible numbers are ok(1,2,3,4) then there is one complementary number.
Is this the way solution?
 [/INST] The number of cases corresponding to the sum $5$ for $n$ throws of a fair dice will be the coefficient of $x^5$ in the following polynomial:
$p(x)=(x^1+x^2+\ldots+x^6)^n$
$=x^n(1+x+\ldots+x^5)^n=x^n\frac{(1-x^6)^n}{(1-x)^n}=x^n(1-x^6)^n(1-x)^{-n}$
$=x^n(1-nx^6+\ldots+(-1)^nx^{6n})\left(1+{n \choose 1}x+{n+1 \choose 2}x^2+{n+2 \choose 3}x^3+{n+3 \choose 4}x^4+{n+4 \choose 5}x^5+\ldots\right)$
$=(x^n-nx^{6+n}+\ldots)\left(1+{n \choose 1}x+{n+1 \choose 2}x^2+{n+2 
\choose 3}x^3+{n+3 \choose 4}x^4+{n+4 \choose 5}x^5+\ldots\right)$
As can be seen from above,

*

*When $1 \leq n \leq 5$, the coefficient of $x^5$ in the above polynomial product will be exactly same as the coefficient of $x^{5-n}$ in the RHS polynomial $(1-x)^{-n}$, i.e., it will be ${n+5-n-1 \choose 5-n} = {4 \choose 5-n}$. Hence the requeired probability will be $\frac{{4 \choose 5-n}}{6^n}$. For example, we can list the probabilities in the following table:

$\begin{align}
\quad \quad  n \quad & prob \\
\quad \quad  1 \quad & \frac{{4 \choose 4}}{6^1}=\frac{1}{6}\\
\quad \quad 2 \quad & \frac{{4 \choose 3}}{6^2}=\frac{1}{9}\\
\quad \quad 3 \quad & \frac{{4 \choose 2}}{6^3}=\frac{1}{36}\\
\quad \quad 4 \quad & \frac{{4 \choose 1}}{6^4}=\frac{1}{324}\\
\quad \quad 5 \quad & \frac{{4 \choose 0}}{6^5}=\frac{1}{7776}\\
\end{align}$

*

*When $n>5$, the required probability is $0$.

Hence, we have the following required probability:
$\text{Prob}(\text{sum of $5$ in $n$ die throws}) = \left\{\begin{array}{lr}
        \frac{{4 \choose 5-n}}{6^n}, & \text{for } & 1\leq n \leq 5\\
        0, & \text{ } & \text{otherwise}
        \end{array}\right\}$
</s>