Browse · MathNet
PrintBalkan Mathematical Olympiad Shortlist
algebra
Problem
Let be a function from the positive integers to the positive integers for which , and for all . Prove that for any natural number , the number of odd natural numbers such that is equal to the number of positive integers not greater than having no common prime factors with .
Solution
The crucial observation that solves this problem is that the function encodes Euclid's algorithm when we view numbers in binary. To make this precise, we will write for , and consider for each integer the pair . If we let be the binary string representing then the recurrence relations give us that Thus we can calculate the pair as follows: start from the pair . Now read the binary digits of from left to right, ignoring the initial 1: whenever you see a 0 add the first coordinate to the second, and whenever you see a 1 add the second coordinate to the first. For example, to calculate the pair we write in binary, which gives us the sequence of pairs Now from this it follows by induction that are coprime positive integers, with if and only if is odd. To complete the proof, we just need to show that each pair of coprime positive integers arises as for a unique positive integer .
To show existence of , imagine running Euclid's algorithm on the pair : that is to say, we successively either subtract the first coordinate from the second or the second from the first (depending on which of the two is the larger) until we can't go any further, which is when we reach the pair . We can record this as a string consisting of a 0 for each time we subtracted the first from the second, and a 1 for each time we subtracted the second from the first. Reversing this string and prepending a 1 gives the binary expansion of a number which (by our method of calculating ) has . To get uniqueness of we just have to note that when we ran Euclid's algorithm to construct in the previous paragraph, we had no choices at any stage: there is a unique series of reductions that takes to while remaining in positive integers. This series of reductions corresponds to a unique binary string, so the integer we constructed was unique.
---
Alternative solution.
As in the previous solution, we consider the pair for each positive integer , show by induction that are coprime, and that if and only if is even. However, to show that each pair of coprime positive integers arises as for a unique , we proceed by strong induction on . Specifically, if then for some integer , whence by the recursive rules for . To show uniqueness, if then (since ) we know that must be even. However, then by the recursive rules for again so that (inductive hypothesis) . This gives uniqueness. The case is similar and the exceptional case is easy, which completes the proof.
To show existence of , imagine running Euclid's algorithm on the pair : that is to say, we successively either subtract the first coordinate from the second or the second from the first (depending on which of the two is the larger) until we can't go any further, which is when we reach the pair . We can record this as a string consisting of a 0 for each time we subtracted the first from the second, and a 1 for each time we subtracted the second from the first. Reversing this string and prepending a 1 gives the binary expansion of a number which (by our method of calculating ) has . To get uniqueness of we just have to note that when we ran Euclid's algorithm to construct in the previous paragraph, we had no choices at any stage: there is a unique series of reductions that takes to while remaining in positive integers. This series of reductions corresponds to a unique binary string, so the integer we constructed was unique.
---
Alternative solution.
As in the previous solution, we consider the pair for each positive integer , show by induction that are coprime, and that if and only if is even. However, to show that each pair of coprime positive integers arises as for a unique , we proceed by strong induction on . Specifically, if then for some integer , whence by the recursive rules for . To show uniqueness, if then (since ) we know that must be even. However, then by the recursive rules for again so that (inductive hypothesis) . This gives uniqueness. The case is similar and the exceptional case is easy, which completes the proof.
Techniques
Injectivity / surjectivityφ (Euler's totient)Greatest common divisors (gcd)