Problem:
Find all 7-digit numbers formed by using only the digits and , and divisible by both and .
Problem:
Find all 7-digit numbers formed by using only the digits and , and divisible by both and .
Solution:
Clearly, the last digit must be and we have to determine the remaining digits. For divisibility by , it is sufficient to consider the number obtained by replacing by ; for example is divisible by if and only if is divisible by . Each such number is obtained by adding some of the numbers from the set along with . We look at the remainders of these when divided by ; they are . Thus it is sufficient to check for those combinations of remainders which add up to a number of the form , since the last digit is already . These are and . These correspond to the numbers .