Skip to main content
OlympiadHQ

Browse · MathNet

Print

Japan Junior Mathematical Olympiad

Japan number theory

Problem

Suppose each digit of a positive integer is greater than or equal to and less than or equal to . Suppose further that is a multiple of and every integer obtained by permuting digits of is also a multiple of . Determine all such integers .
Solution
Let us show first that any positive integer satisfying the condition of the problem must have the same number in all of its digits. In order to show this it is enough to show that if the integers and appear among the digits of , where and if satisfies the condition of the problem, then must hold.

So, suppose and appear among the digits of the number . Permute the digits of in such a way to get a number in which appears in the 10's digit and appears in 1's digit. Call this new number . Let be the number obtained by discarding the 10's and 1's digits of (In case is a 2-digit number, let ). Then we can write . Let be the number obtained by interchanging the 10's and 1's digits of . Then we also have .

By the condition of the problem both and are the multiples of since both are obtained by permuting digits of . Consequently, the difference must also be a multiple of . Since and are relatively prime, we conclude that must be a multiple of . But since , we conclude that , which establishes our claim.

Next, consider the case where . By carrying out simple divisions, we see that the 6-digit number is a multiple of , while any -digit number obtained by putting into each digit is not a multiple of if .

Now, for each positive integer and with , denote by the number having digits, each of which is . Then if we divide by we get as a remainder a number which has digits each of which is (We let , since there is no remainder if ). Consequently, we see that in order to decide whether a number is a multiple of or not it is enough to see whether the remainder is a multiple of or not.

If , is a multiple of . So, let us suppose that . Then, is a multiple by of the number having -digits, each of which is . Since , we see that is not multiple of . Since is also not a multiple of , we conclude that is not multiple of either. Thus, we see that the number with all of its digits being equal to , where , must be of the form , where .

Summarizing the arguments made above, we conclude that the positive integer satisfying the condition of the problem must have one of the following forms:

Final answer
All positive integers whose digits are all equal. If the common digit is seven, any length is allowed. If the common digit is between one and six, the number of digits must be a multiple of six.

Techniques

Greatest common divisors (gcd)Inverses mod n