QlarIITy

MathematicsJEE Main 2023 · 1 FebruaryInteger

The total number of six digit numbers, formed using the digits 4, 5, 9 only and divisible by 6, is _____ .

Try it before you look.The full solution is on this page, below the answer box, the moment you check. No sign-in needed.

Solution

Core idea. When the digits cover all three remainders, one free place completes a multiple of 3.

Concept refresher. A number is divisible by 3 exactly when its digit sum is. If the digits leave remainders r1,r2,…r_1, r_2, \ldots on division by 3, this means

r1+r2+…=3kr_1 + r_2 + \ldots = 3k

for a whole number kk.

Picture the situation. Divisibility by 6 means divisibility by 2 and by 3. Among the digits 4, 5 and 9 only 4 is even, so the last digit is fixed. On division by 3 the digits 4, 5 and 9 leave remainders 1, 2 and 0, one of each kind. So whatever the other digits are, one free place can always be filled in exactly one way to make the digit sum a multiple of 3.

Approach. Fix the last digit, leave four digits free, and let the remaining digit be forced.

  1. Step 1: The last digit

    The number must be even, and 4 is the only even digit available, so the last digit is 4.

  2. Step 2: The digit sum

    The digits 4, 5, 9 leave remainders 1, 2, 0 on division by 3. So for any choice of the first four digits, exactly one choice of the fifth digit makes the digit sum a multiple of 3.

  3. Step 3: Count

    The first four digits are free, giving 34=813^4 = 81 ways, and the fifth is then forced, so there are 81 such numbers.

Answer. 81

Sanity check. Among the 35=2433^5 = 243 numbers ending in 4, the three possible remainders of the digit sum occur equally often, so one third of them, 81, are divisible by 3.

Common wrong answers

  • 243: Requiring only divisibility by 3 gives 363=243\dfrac{3^6}{3} = 243; the last digit must also be 4.

Key takeaway

The trap. The only even digit available must be the last digit.

How toppers think. They see that exactly one third of the strings pass the digit-sum test.

Remember. Last digit forced, one more digit forced.

More on Fundamental Principle of Counting