Using only the digits $2,3,9$, how many six-digit numbers can be formed which are divisible by $6$?

The options are:

(A) $41$

(B) $80$

(C) $81$

(D) $161$

The last digit must be $2$. But I faced problem when calculating the number of number which are divisible by $3$. Somebody please help me.


closed as off-topic by Namaste, kimchi lover, The Phenotype, TheSimpliFire, Claude Leibovici Feb 1 '18 at 10:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Namaste, kimchi lover, The Phenotype, TheSimpliFire, Claude Leibovici
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ Sum of all digits used must be divisible by 3. $\endgroup$ – user202729 Jan 13 '18 at 11:02
  • $\begingroup$ I know that but how to calculate the number $\endgroup$ – Sufaid Saleel Jan 13 '18 at 11:03
  • $\begingroup$ Don't need more answers. $\endgroup$ – Sufaid Saleel Jan 16 '18 at 15:14

As the number should be a multiple of $3$, the sum of digits must be divisible by $3$: as the digits $3$ and $9$ are themselves divisible by $3$, hence we should use either three or six $2$s.

Using six $2$s, there is only one number.

Using three $2$s, the number will be of the form: $$XXXXX2$$ where each $X$ represents a digit. We need to select an additional two $2$s, which can be placed in $\binom52 =10$ ways. The remaining three positions will then have two options each ($3$ or $9$). So, we have a total of: $$\binom52 \times 2^3 =80$$ and a grand total of $81$ ways.

  • 5
    $\begingroup$ Yes. The following facts are more or less implicitly used: (A) A number is divisible by $2$ if and only if its last digit is divisible by $2$. (B) A number is divisible by $3$ if and only if its digit sum is divisible by $3$. (C) A number is divisible by $6$ if and only if it is divisible by both $2$ and $3$. $\endgroup$ – Jeppe Stig Nielsen Jan 13 '18 at 14:52

Here are some hints:

You are right that it has to end with a $2$. Now the rest of the digits has to add up to a number that is divisible by $3$. So if you fill the rest of the slots of your $6$ digit numbers with $9$s and $3$s you are safe BUT the $2$ in the unit digit place make it so you have to hide two more $2$s in your number. So essentially what you are after is in how many ways you can put two more $2$s and fill the rest with $9$s or $3$s in the rest of the five digit places. Or of course you can fill all the six places with $2$s.

Hope this helps :)


Let's find a divisability test for 6.

\begin{equation} 1 = 1 \mod 6\\ 10 = 4 \mod 6\\ 100 = 4*10 = 4 \mod 6,\\ \text{and so on for higher powers of 10} \end{equation}

Thus, we find: a number X is divisable by 6 iff, cutting of the last digit, taking the sum of the other digits times 4 and adding the last digit the result is divisable by 6.

You are asked for a 6 digit number using only $2,3,9$. We are thus asked to find $a,b,c,d,e,f \in {2, 3, 9}$ such that $4 * (a + b + c + d + e) + f = 0 \mod 6$. As you noted, the last digit must be $2$, which you can conclude from the equation above quite easily by noticing that f must be even. So we conclude $4 * (a + b + c + d + e) = 4 \mod 6$ thus $a + b + c + d + e = {1,4} \mod 6$ and $a + b + c + d + e = 1 \mod 3$ follows. Since both $6$ and $9$ reduce modulo 6, either 2 or 5 higher digits must be equal to $2$, the rest can be chosen freely.

\begin{equation} \binom{5}{2} * 2^3 + \binom{5}{5} * 2^0 = 81 \end{equation}


Not the answer you're looking for? Browse other questions tagged or ask your own question.