Browse · MathNet
PrintEstonian Mathematical Olympiad
Estonia number theory
Problem
How many integers are there for which and the sum is divisible by , if
a) ; b) ?
a) ; b) ?
Solution
Note that .
a) Since is odd, the number is divisible by if and only if is divisible by .
Since , the number can be expressed as , where , and are positive integers. The number is divisible by iff is divisible by and . Since and have no common factor, their product is divisible by iff one of the factors is divisible by this number. If is divisible by then , if is divisible by then .
By Chinese Remainder Theorem the congruence system has exactly one solution in the interval for any integers and . The solution satisfies the conditions of the problem iff . There are 4 ways to choose such a vector of the right hand sides, each of them gives a different solution .
b) The number is divisible by iff is divisible by .
Since , the number can be expressed as , where , and are positive integers. The number is divisible by iff is divisible by , and . Since and have no common factor, their product is divisible by each of the powers of the primes iff one of the factors is divisible by this number. So is divisible by iff or , and by () iff or .
By Chinese Remainder Theorem the congruence system has exactly one solution in the interval for any integers and . The solution satisfies the conditions of the problem iff and . Note that if then , and if then . Otherwise let and define as the solution of the congruence system in the interval . Note that ; since , we have , hence . Also note that means that exactly one of claims and is true, the same holds for . It follows that exactly one of claims and is true. Indeed, if both were true then , if neither of them were valid, then – a contradiction in both cases. Consequently there are integers satisfying the conditions.
a) Since is odd, the number is divisible by if and only if is divisible by .
Since , the number can be expressed as , where , and are positive integers. The number is divisible by iff is divisible by and . Since and have no common factor, their product is divisible by iff one of the factors is divisible by this number. If is divisible by then , if is divisible by then .
By Chinese Remainder Theorem the congruence system has exactly one solution in the interval for any integers and . The solution satisfies the conditions of the problem iff . There are 4 ways to choose such a vector of the right hand sides, each of them gives a different solution .
b) The number is divisible by iff is divisible by .
Since , the number can be expressed as , where , and are positive integers. The number is divisible by iff is divisible by , and . Since and have no common factor, their product is divisible by each of the powers of the primes iff one of the factors is divisible by this number. So is divisible by iff or , and by () iff or .
By Chinese Remainder Theorem the congruence system has exactly one solution in the interval for any integers and . The solution satisfies the conditions of the problem iff and . Note that if then , and if then . Otherwise let and define as the solution of the congruence system in the interval . Note that ; since , we have , hence . Also note that means that exactly one of claims and is true, the same holds for . It follows that exactly one of claims and is true. Indeed, if both were true then , if neither of them were valid, then – a contradiction in both cases. Consequently there are integers satisfying the conditions.
Final answer
a) 4; b) 3
Techniques
Chinese remainder theoremGreatest common divisors (gcd)Sums and products