# Week 23

Example 1. Using only the digits 2, 3 and 9, how many six digit numbers can be formed which are divisible by 6?

Example 2. When the product of four consecutive odd positive integers is divided by 5, find the set of remainder(s).

Of course, you can find the solution just below, but it is highly recommended that, you first try to solve it on your own.

Just remember the words of Paul Halmos, who says “the only way to learn mathematics is to do mathematics”.

Solution 1. Let the number be n = abcdef. Each entry can take three possible values: 2, 3 and 9 independently. So, there are 36 such numbers in all.

But we want only those numbers which are (i.e., n) divisible by 6. This is equivalent to n being divisible by both 2 and 3.

For n to be divisible by 2, f must be even and hence 2 is the only possible value. The second requirement implies that the sum a + b + c + d + e + f is divisible by 3.

As 3 and 9 are each divisible by 3 and f = 2, there are only two possibilities for n to be divisible by 3:

(i) exactly two of a, b, c, d and e are 2; and

(ii) all five of them are 2.

When (i) holds, the remaining three places can be filled by 3 and 9 in 23 = 8 ways. So there are

numbers of type (i). There is only one number, viz. 222222 of type (ii).

So the total count is 80 + 1 = 81.

Solution 2. Simplicity of the solution depends on the choice of the four consecutive odd numbers.

Let the four consecutive odd numbers be 2m – 3, 2m – 1, 2m + 1 and 2m + 3. So, if we denote the product by P, we have

P = (2m − 3)(2m − 1)(2m + 1)(2m + 3)                              (1)

= (2m − 3) (2m + 3)(2m − 1)(2m + 1)

= (4m2 − 1)(4m2 − 9)

= 16m4 − 40m2 + 9                                                (2)

Case 1. When at least one of these four integers is divisible by 5. Then, P is also divisible by 5, using (1). Hence remainder is 0, in this case.

Case 2. Let m = 5k for some integer k. Putting this into (2), we get

P = 16(5k)4 – 40(5k)2 + 9

= 10000k4 – 1000k2 + 5 + 4

= 5(2000k4 – 200k2 + 1) + 4,

showing that P leaves the remainder 4 when divided by 5.

Hence the possible remainders are 0 and 4.