Find the sum of the elements of the set
Romanian Mathematical Olympiad
Solution
Consider the set and notice that and .
The largest even number from is equal to and it is obtained for . The number is obtained for . The largest odd number from is equal to and it is obtained for , implying that and .
We claim that all the integers between and belong to .
Let and let be the remainder left by upon division by . Write with and . If is even, then , where . If is odd, then , so and , where .
For , write with . If is even, then , where . If is odd, then , so and , where . A quick inspection of all the above cases shows that the claim holds.
Want a route through all this instead of an archive? The track
puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.