permutation of 5 digit numbers divisible by 3 "The total number of possible combination of 5 digits numbers formed from the digits(0,1,2,3,4,5,6,7,8,9) which are divisible by 3?"
This was the question given to me by my mathematics teacher during out permutation and combination lessons;I was able to solve this with ease but later I was thought of modifing the problem a little bit to
"The total number of possible combination of 5 digits numbers formed from the digits(0,1,2,3,4,5,6,7,8,9) which are divisible by 3 without repetation of any digits?  eg 12345 not 33120"
I asked my teacher about the solution of the problem because i was unable to solve it with certain accuracy, he was unable to give me a satisfactory answer.
Can anyone help me in solving this problem
thank you.
 A: Update
Among the $10$ digits there are $4$ having remainder $0$ mod $3$, and $3$ each having remainder $1$ or $2$ mod $3$. We have to select $x_0$, $x_1$, $x_2$ of these digits, such that $$x_0+x_1+x_2=5,\qquad x_1-x_2=0\quad {\rm mod}\ 3\ .\tag{1}$$
We can partition $5$ into three nonnegative parts in the following $5$ ways:
$$p_1:\  5+0+0,\quad p_2:\ 4+1+0,\quad p_3:\ 3+2+0,\quad p_4:\ 3+1+1,\quad p_5:\ 2+2+1\ .$$
The first and the second of these cannot be used. Then $p_3$ together with $(1)$ leads to the solutions $(x_0,x_1,x_2)=(2,3,0)$ and $(x_0,x_1,x_2)=(2,0,3)$. For $p_4$ we obtain $(x_0,x_1,x_2)=(3,1,1)$, and for $p_5$ we obtain $(x_0,x_1,x_2)=(1,2,2)$.
It follows that we can select the five digits in
$$2{4\choose2}{3\choose3}+{4\choose 3}{3\choose1}{3\choose1}+{4\choose 1}{3\choose2}{3\choose2}=84\tag{2}$$
ways. Multiply this by $5!=120$ to account for their arrangement, and obtain $10\,080$.
In a comment later on the OP has excluded the strings beginning with $0$. In order to account for this we first compute the admissible selections of five digits containing no $0$. To this end it suffices to replace $4$ by $3$ in $(2)$:
$$2{3\choose2}{3\choose3}+{3\choose 3}{3\choose1}{3\choose1}+{3\choose 1}{3\choose2}{3\choose2}=42\ .$$
Therefore $84-42=42$ admissible selections of five digits contain a zero, and these give rise to $42\cdot{5!\over5}=1008$  strings beginning with a $0$. Subtract these from $10\,080$, and obtain $9072$ as final result.
A: Here is a correct solution along the lines of Manthanein's answer:
There are $9\cdot8\cdot7\cdot 6  \cdot5=15\,120$ strings of length $5$ not containing a repeat or  zero. Adding $1$ mod $9$ to each digit in such a string  changes its sum by $2$ mod $3$. From this we can conclude  that exactly one third of these strings have a sum which is divisible by $3$. It follows that there are 5040 valid strings of this kind.
Similarly, there are $9\cdot8\cdot7\cdot 6=3024$ strings of length $4$ not containing a repeat or zero, and exactly one third of these strings have a sum which is divisible by $3$. Given such a string we can insert a $0$ at four different places in order to obtain a valid string of length $5$. It follows that there are ${3024\cdot 4\over3}=4032$ valid strings of this kind.
In all there are $5040+4032=9072$ valid strings of length $5$.
A: There are in total $9*9*8*7*6$ 5 digit numbers with distinct digits.  The probability that a number is divisible by 3 in all these cases is $\frac {1}{3}$
Hence the number of numbers with 5 distinct digits satisfying the given conditions is 
$$9*9*8*7*6* \frac {1}{3}=9072$$
