Let be pairwise coprime positive integers with being prime and . On the segment of the real line, mark all integers that are divisible by at least one of the numbers . These points split into a number of smaller segments. Prove that the sum of the squares of the lengths of these segments is divisible by .
Solutions — 2
Solution 1
Let . Throughout the solution, all intervals will be nonempty and have integer end-points. For any interval , the length of will be denoted by .
Define the following two families of intervals:
We are interested in computing modulo .
Note that the number is marked, so in the definition of the condition is enforced without explicitly prescribing it.
Assign weights to the intervals in , depending only on their lengths. The weight of an arbitrary interval will be , where
Consider an arbitrary interval and its sub-intervals . Clearly, has one sub-interval of length , two sub-intervals of length and so on; in general has sub-intervals of length for every . The sum of the weights of the sub-intervals of is
Since the intervals in are non-overlapping, every interval is a sub-interval of a single interval . Therefore,
For every , we count how many intervals in are of length . Notice that the multiples of are all marked, so the lengths of the intervals in and cannot exceed . Let be an arbitrary integer with and consider the interval . Let be the remainders of modulo , respectively. Since are pairwise coprime, the number is uniquely identified by the sequence , due to the Chinese remainder theorem.
For every , the property that the interval does not contain any multiple of is equivalent with , i.e. , so there are choices for the number for each . Therefore, the number of the remainder sequences that satisfy is precisely . Denote this product by .
Now we can group the last sum in (1) by length of the intervals. As we have seen, for every there are intervals with . Therefore, (1) can be continued as
Having the formula (2), the solution can be finished using the following well-known fact:
Lemma. If is a prime, is a polynomial with integer coefficients, and , then is divisible by .
Proof. Obviously, it is sufficient to prove the lemma for monomials of the form with . Apply induction on . If then , and the statement is trivial.
Let , and assume that the lemma is proved for all lower degrees. Then
Since , this proves .
In (2), by applying the lemma to the polynomial and the prime , we obtain that is divisible by . The term is also divisible by ; these two facts together prove that is divisible by .
Solution 2
The conventions from the first paragraph of the first solution are still in force. We shall prove the following more general statement:
(⊞) Let denote a prime number, let be pairwise coprime positive integers, and let be an integer with . Mark all integers that are divisible by at least one of the numbers on the interval of the real line. These points split into a number of smaller segments, say of lengths . Then the sum is divisible by .
Applying to and and using the equation , one easily gets the statement of the problem.
To prove itself, we argue by induction on . The base case follows from the known fact that the binomial coefficient is divisible by whenever .
Let us now assume that , and that the statement is known whenever rather than coprime integers are given together with some integer . Suppose that the numbers and are as above. Write and . Mark the points on the real axis divisible by one of the numbers green and those divisible by red. The green points divide into certain sub-intervals, say .
To translate intervals we use the notation whenever .
For each let be the family of intervals into which the red points partition the intervals . We are to prove that
is divisible by .
Let us fix any index with for a while. Since the numbers and are coprime by hypothesis, the numbers form a complete system of residues modulo . Moreover, we have , as in particular all multiples of are green. So each of the intervals contains at most one red point. More precisely, for each there is exactly one amongst those intervals containing a red point splitting it into an interval of length followed by an interval of length , while the remaining such intervals have no red points in their interiors. For these reasons
So it remains to prove that
is divisible by . By the induction hypothesis, however, it is even true that both summands are divisible by , for . This completes the proof of and hence the solution of the problem.