A six-digit positive integer, ABCDEF, is divisible by all the integers from 2 to 6, both inclusive. How many such numbers are possible, if all the digits of the number are distinct and less than 7?
Digits = {0,1,2,3,4,5,6} : 7 options and all are distinct
Divisibility rule by 2: even number: last digit = {0,2,4,6} : 4 options
Divisibility rule by 3: Sum of digits is divisible by 3
Divisibility rule by 4: Last 2 digits are divisible by 4
Divisibility rule by 5: Last digit = {0,5}
Divisibility rule by 6: automatic if Divisibility rule by 2 & Divisibility rule by 3 are complied with
Last digit = F = 0; Combining Divisibility rule by 2 & Divisibility rule by 5
Second last digit = E = {2,4,6}: Divisibility rule by 4
Sum of digits = A+B+C+D+E+F(0) is a multiple of 3: Divisibility rule by 3 & Divisibility rule by 6
A+B+C+D+E = 3k; where k is an integer
Case 1: E = 2; A+B+C+D = 3k - 2; 1+3+4+5= 13 <= 3k - 2 <= 6+5+4+3= 18
15 <= 3k <= 20; 5 <= k < 7; k = {5,6}
Case 1a: k = 5; A+B+C+D=13; (A,B,C,D) = (1,3,4,5); Number of ways = 4! = 24
Case 1b: k = 6; A+B+C+D=16; (A,B,C,D) = (1,4,5,6); Number of ways = 4! = 24
Case 2: E=4; A+B+C+D = 3k - 4; 1+2+3+5= 11 <= 3k - 4 <= 6+5+3+2= 16
15 <= 3k <= 20; 5 <= k < 7; k = {5,6}
Case 1a: k = 5; A+B+C+D=11; (A,B,C,D) = (1,2,3,5); Number of ways = 4! = 24
Case 1b: k = 6; A+B+C+D=14; (A,B,C,D) = (1,2,5,6); Number of ways = 4! = 24
Case 3: E=6; A+B+C+D = 3k - 6; 1+2+3+4= 10 <= 3k - 4 <= 5+4+3+2= 14
14 <= 3k <= 18; 5 <= k <= 6; k = {5,6}
Case 1a: k = 5; A+B+C+D=9; No solution since A, B, C & D are distinct
Case 1b: k = 6; A+B+C+D=12; (A,B,C,D) = (1,2,4,5); Number of ways = 4! = 24
Total such numbers = 24*5 = 120
IMO E