Solving permutation problem sequentially. We have four dice and we want to know the number of ways in which at lease one dice shows 3.
This is pretty simple if we judge it directly by saying that the number of ways in which all the dice can show any number is $6^4$ and the number of ways in which $3$ does not appear anywhere is $5^4$. Subtracting the two gives us the right answer i.e $679$.
I am new to combinatorics and hence when I tried to solve it sequentially by writing out things like the number of ways through permutation formula in which we count the number of ways one by one, first assuming that we have only one $3$, then two $3s$ and so on, I get confused a lot.
Can anybody help me with the procedure of solving this by writing permutation formula for each and every sequence (one three at a time, two threes at a time etc.) That would be of great help since I can find no other way through which I can remove my doubts.
 A: The number of ways to get exactly $k$ threes when rolling $n$ dice is:
$$\binom{n}{k}\cdot5^{n-k}$$

For $4$ dice, we have:


*

*The number of ways to get exactly $\color\red0$ threes: $\binom{4}{\color\red0}\cdot5^{4-\color\red0}=625$

*The number of ways to get exactly $\color\red1$ threes: $\binom{4}{\color\red1}\cdot5^{4-\color\red1}=500$

*The number of ways to get exactly $\color\red2$ threes: $\binom{4}{\color\red2}\cdot5^{4-\color\red2}=150$

*The number of ways to get exactly $\color\red3$ threes: $\binom{4}{\color\red3}\cdot5^{4-\color\red3}=20$

*The number of ways to get exactly $\color\red4$ threes: $\binom{4}{\color\red4}\cdot5^{4-\color\red4}=1$


In order to verify this: $625+500+150+20+1=1296=6^4$.
A: barak manos' answer is perfectly fine, but since you keep on harping about permutations, firstly note that there is only one way a $3$ can occur on a throw, whereas there are $5$ ways a non-3, let's call it N, can occur on a throw.
So you can formulate it as [Ways for a pattern to occur on a throw]$\times$ [its permutations]
Single $3,\;e.g.\;\; N-3-N-N:\;\; (1\cdot5^3) \times \dfrac{4!}{1!3!}$ 
Double $3, \;e.g.\;\; N-3-3-N:\;\; (1^2\cdot5^2) \times \dfrac{4!}{2!2!}$
Triple $3, \;e.g.\;\; 3-N-3-3:\;\; (1^3\cdot5^1) \times \dfrac{4!}{3!1!}$
All four $3, \;e.g.\;\; 3-3-3-3:\;\; (1^4) \times \dfrac{4!}{4!}$
A: Number of ways = 1 time 3 + 2 time 3 + 3 time 3 + 4 time 3
Number of ways = C(4,1) * $(5)^3$ + C(4,2) * $(5)^2$ + C(4,3) * $(5)^1 + C(4,4) * (5)^0$ 
