Solveeit Logo

Question

Question: Integers 1, 2, 3, ..., n, where n > 2 are written on a board. Two numbers m, k such that 1 < m < n, ...

Integers 1, 2, 3, ..., n, where n > 2 are written on a board. Two numbers m, k such that 1 < m < n, 1 < k < n are removed and the average of the remaining numbers is found to be 17. What is the maximum sum of the two removed numbers?

Answer

51

Explanation

Solution

Let the sum of numbers be Sn=n(n+1)2S_n = \frac{n(n+1)}{2}. Let the two removed numbers be m and k. Constraints: 2m,kn12 \le m, k \le n-1 and mkm \ne k. The sum of remaining numbers is Sn(m+k)S_n - (m+k). The average of remaining numbers is 17: Sn(m+k)n2=17\frac{S_n - (m+k)}{n-2} = 17. Substitute SnS_n: n(n+1)/2(m+k)n2=17\frac{n(n+1)/2 - (m+k)}{n-2} = 17. Let X=m+kX = m+k. X=n(n+1)217(n2)=n2+n34n+682=n233n+682X = \frac{n(n+1)}{2} - 17(n-2) = \frac{n^2+n-34n+68}{2} = \frac{n^2-33n+68}{2}. The minimum possible value for XX is 2+3=52+3=5. The maximum possible value for XX is (n1)+(n2)=2n3(n-1)+(n-2)=2n-3. So, 5n233n+6822n35 \le \frac{n^2-33n+68}{2} \le 2n-3.

  1. 10n233n+68    n233n+58010 \le n^2-33n+68 \implies n^2-33n+58 \ge 0. Roots are 33±85721.865,31.135\frac{33 \pm \sqrt{857}}{2} \approx 1.865, 31.135. Since n>2n>2, n32n \ge 32.
  2. n233n+684n6    n237n+740n^2-33n+68 \le 4n-6 \implies n^2-37n+74 \le 0. Roots are 37±107322.125,34.875\frac{37 \pm \sqrt{1073}}{2} \approx 2.125, 34.875. So 3n343 \le n \le 34.

Combining n32n \ge 32 and 3n343 \le n \le 34, we get 32n3432 \le n \le 34. The function X(n)=n233n+682X(n) = \frac{n^2-33n+68}{2} is an upward-opening parabola with axis of symmetry at n=16.5n=16.5. For n{32,33,34}n \in \{32, 33, 34\}, the function is increasing. Therefore, the maximum value of X occurs at n=34n=34. For n=34n=34: X=34233(34)+682=34(3433)+682=34+682=1022=51X = \frac{34^2 - 33(34) + 68}{2} = \frac{34(34-33) + 68}{2} = \frac{34+68}{2} = \frac{102}{2} = 51. For n=34n=34, the allowed range for m, k is 2m,k332 \le m, k \le 33. A sum of 51 is achievable (e.g., m=25,k=26m=25, k=26).

The final answer is 51.