Browse · MathNet
PrintBaltic Way 2023 Shortlist
Baltic Way 2023 number theory
Problem
For a positive integer , let denote the positive integer whose decimal representation is equal to the octal representation of . For example, , , . Two positive integers satisfy the relation What is the smallest possible value of if ?
Solution
The answer is 2137.
First of all, let's observe that , satisfies the given relation. In fact,
Now let's assume that the octal representation of ends with exactly digits “7” (maybe ). In other words, where is a nonnegative integer satisfying . In particular, we know that because there is no carry in addition in the octal system, since . Therefore,
Let's observe that would imply that and therefore . would imply and therefore or . If then (because ) and therefore and . is also impossible because:
Now let's assume that we can find a solution with . Then has at most 4 digits in its octal representation. Let for be equal to 1 if there is a carry at the -th position in addition of and in octal system. It is easy to conclude that We have the implication: We know that because otherwise we would have: Because 78 is coprime with 11, we need to have the divisibility . Since , there are only three possible cases: . They correspond to , so . The first two cases are impossible because they assume but , so there has to be a carry at the first position.
First of all, let's observe that , satisfies the given relation. In fact,
Now let's assume that the octal representation of ends with exactly digits “7” (maybe ). In other words, where is a nonnegative integer satisfying . In particular, we know that because there is no carry in addition in the octal system, since . Therefore,
Let's observe that would imply that and therefore . would imply and therefore or . If then (because ) and therefore and . is also impossible because:
Now let's assume that we can find a solution with . Then has at most 4 digits in its octal representation. Let for be equal to 1 if there is a carry at the -th position in addition of and in octal system. It is easy to conclude that We have the implication: We know that because otherwise we would have: Because 78 is coprime with 11, we need to have the divisibility . Since , there are only three possible cases: . They correspond to , so . The first two cases are impossible because they assume but , so there has to be a carry at the first position.
Final answer
2137
Techniques
Greatest common divisors (gcd)Other