Maths Olympiad Prep

Track / Stage 8 / 57 of 180 #1757 of 1964

Problem 1757

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.1 Prove it

Let us call a set of positive integers [i]nice[/i], if its number of elements is equal to the average of all its elements. Call a number nn [i]amazing[/i], if one can partition the set {1,2,,n}\{1,2,\ldots,n\} into nice subsets.

a) Prove that any perfect square is amazing.

b) Prove that there exist infinitely many positive integers which are not amazing.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official solution

### Part (a): Prove that any perfect square is amazing.

1. Define the problem and notation:
- We need to show that for any perfect square n2 n^2 , the set {1,2,,n2}\{1, 2, \ldots, n^2\} can be partitioned into subsets where each subset is "nice". A set is "nice" if the number of elements in the set is equal to the average of its elements.

2. **Consider the set {1,2,,n2}\{1, 2, \ldots, n^2\}:**
- The sum of the first n2 n^2 positive integers is given by:
S=k=1n2k=n2(n2+1)2 S = \sum_{k=1}^{n^2} k = \frac{n^2(n^2 + 1)}{2}

3. **Partition the set into n n subsets each of size n n :**
- We can partition {1,2,,n2}\{1, 2, \ldots, n^2\} into n n subsets, each containing n n elements. Let's denote these subsets as A1,A2,,An A_1, A_2, \ldots, A_n .

4. Calculate the sum and average of each subset:
- Each subset Ai A_i will have n n elements. The sum of the elements in each subset should be such that the average of the elements equals n n , the number of elements in the subset.

5. Construct the subsets:
- One way to construct these subsets is to take consecutive blocks of n n elements. For example:
A1={1,2,,n},A2={n+1,n+2,,2n},,An={(n1)n+1,(n1)n+2,,n2} A_1 = \{1, 2, \ldots, n\}, \quad A_2 = \{n+1, n+2, \ldots, 2n\}, \quad \ldots, \quad A_n = \{(n-1)n + 1, (n-1)n + 2, \ldots, n^2\}

6. Verify the "nice" property:
- For each subset Ai A_i , the sum of the elements is:
Sum(Ai)=k=(i1)n+1ink \text{Sum}(A_i) = \sum_{k=(i-1)n+1}^{in} k
- The average of the elements in Ai A_i is:
Average(Ai)=Sum(Ai)n \text{Average}(A_i) = \frac{\text{Sum}(A_i)}{n}
- Since the elements in each subset are consecutive integers, the average of the elements in Ai A_i will be the middle element of the subset, which is n n . Therefore, each subset Ai A_i is "nice".

7. Conclusion:
- Since we can partition {1,2,,n2}\{1, 2, \ldots, n^2\} into n n subsets, each of which is "nice", any perfect square n2 n^2 is amazing.

\blacksquare

### Part (b): Prove that there exist infinitely many positive integers which are not amazing.

1. **Consider numbers of the form n3(mod4) n \equiv 3 \pmod{4} :**
- We need to show that for some numbers n3(mod4) n \equiv 3 \pmod{4} , the set {1,2,,n}\{1, 2, \ldots, n\} cannot be partitioned into "nice" subsets.

2. **Properties of numbers n3(mod4) n \equiv 3 \pmod{4} :**
- Let n=4k+3 n = 4k + 3 for some integer k k . The sum of the first n n positive integers is:
S=i=1ni=n(n+1)2 S = \sum_{i=1}^{n} i = \frac{n(n+1)}{2}
- For n=4k+3 n = 4k + 3 , this becomes:
S=(4k+3)(4k+4)2=(4k+3)(2k+2)=8k2+14k+6 S = \frac{(4k+3)(4k+4)}{2} = (4k+3)(2k+2) = 8k^2 + 14k + 6

3. Partitioning into "nice" subsets:
- Suppose we can partition {1,2,,n}\{1, 2, \ldots, n\} into subsets where each subset is "nice". Each subset must have an integer number of elements, and the average of the elements in each subset must also be an integer.

4. Contradiction:
- For n=4k+3 n = 4k + 3 , it is often not possible to partition the set into subsets where the number of elements equals the average of the elements. This is because the sum S S and the number of elements n n do not align in a way that allows for such partitions.

5. Conclusion:
- Therefore, there exist infinitely many positive integers n3(mod4) n \equiv 3 \pmod{4} which are not amazing.

\blacksquare

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.