0
$\begingroup$

How many distinct $5$ digit numbers that are divisible by $6$ can be written by using $\{0,1,2,3,4,5\}$ if repetition is allowed?

We know that the last digit must be either $0$ or $2$ or $4$ . However, I am stuck in divisibility by $3$. At first glance, I thought to use an exponential generating function, but I realize that it will be brute force, as well.

Hence, I am looking for nice approach to this question.

You can see the same question but not repetition allowed : Find the number of 5-digit number divisible by 6 which can be formed using $0,1,2,3,4,5$ if repetition of digits is not allowed.

$\endgroup$
8
  • 1
    $\begingroup$ are you familiar with the "rule of 3"? $M$ is a multiple of $3$ if and only if the sum of the digits is a multiple of $3$. Are you familiar with that? $\endgroup$
    – fleablood
    Jun 12, 2021 at 5:20
  • $\begingroup$ @fleablood yeap , but i do not know how to satify it in question . it is long process for trial $\endgroup$
    – user873477
    Jun 12, 2021 at 5:22
  • $\begingroup$ If the $4$ of the $5$ digits are $a,b,c,d$ then the fifth digit, $e$ must be such that $e \equiv a+b+c+d \pmod 6$. Now the options are the $e \equiv 0,1,$ or $2\pmod 3$ (how many of each) and $a+b+c+d \equiv 0,1$ or $2 \pmod 3$ ... can you figure. (This is much easier than the question without repetiion by the way.) $\endgroup$
    – fleablood
    Jun 12, 2021 at 5:25
  • $\begingroup$ Well, you have the last digit must be $0,2$ or $4$. and what are the options for the next three digits. Now gave any set of for digits what choices do you have to make the last digit makes it divisible by $3$. $\endgroup$
    – fleablood
    Jun 12, 2021 at 5:27
  • $\begingroup$ Note that the set $S = \{0,2,4\}$ contains exactly one element congruent to $1 \pmod{3}$, one element congruent to $2 \pmod{3}$, and one element congruent to $3 \pmod{3}.$ Note also that the leftmost digit (arguably) can't be $0$. $\endgroup$ Jun 12, 2021 at 5:36

1 Answer 1

1
$\begingroup$

Whatever the first four digits are, exactly one of the digits from 0 to 5 makes it divisible by 6 when it is added.

Therefore you have 5 choices for the first digit, and 6 choices for the next three digits, for a total of 1,080 numbers.

Interestingly the argument works for any base >= 6, for example there are 1,080 hexadecimal numbers as well.

$\endgroup$
1
  • $\begingroup$ can we generalize this method ? For example let $S = \{0,1,2,3,4,5,6,7,8,9\}$. Then , how many $8$ digit distinct number are there which are divisible by $7$ ? Is the answer equal to $9 \times 10 ^6$? $\endgroup$
    – user873477
    Jun 12, 2021 at 19:49

You must log in to answer this question.