Maths Olympiad Prep

Library / HMMT February /1183 of 1302

HMMT February, 2022

Algebra Difficulty 5.9 AIME, harder Prove it United States

Problem:
Given a positive integer kk, let ∥k∥\|k\| denote the absolute difference between kk and the nearest perfect square. For example, ∥13∥=3\|13\|=3 since the nearest perfect square to 1313 is 1616. Compute the smallest positive integer nn such that
∥1∥+∥2∥+⋯+∥n∥n=100. \frac{\|1\|+\|2\|+\cdots+\|n\|}{n}=100.
Proposed by: Carl Schildkraut

Solution

Solution:
Note that from n=m2n = m^2 to n=(m+1)2n = (m+1)^2, ∥n∥\|n\| increases from 00 to a peak of mm (which is repeated twice), and then goes back down to 00. Therefore
∑n=1m2∥n∥=∑k=1m−12(1+2+⋯+k)=∑k=1m−12(k+12)=2(m+13)=m3(m2−1) \sum_{n=1}^{m^2} \|n\| = \sum_{k=1}^{m-1} 2(1+2+\cdots+k) = \sum_{k=1}^{m-1} 2\binom{k+1}{2} = 2\binom{m+1}{3} = \frac{m}{3}\left(m^2-1\right)
In particular, if n=m2−1n = m^2 - 1,
∥1∥+∥2∥+⋯+∥n∥n=m3, \frac{\|1\|+\|2\|+\cdots+\|n\|}{n} = \frac{m}{3},
so n=3002−1n = 300^2 - 1 satisfies the condition. However, this does not prove that there are not smaller solutions for nn.
Let N=3002−1N = 300^2 - 1 and suppose that N−kN - k satisfies the condition. Then, we know that
∥N∥+∥N−1∥+⋯+∥N−(k−1)∥k=100. \frac{\|N\| + \|N-1\| + \cdots + \|N-(k-1)\|}{k} = 100.
Since ∥N−k∥=k+1\|N-k\| = k+1 for k≤298k \leq 298, one can show that k=199k = 199 works. By looking at further terms, one can convince oneself that no larger value of kk works. Thus, the answer is 3002−1−199=90000−200=89800300^2 - 1 - 199 = 90000 - 200 = 89800.

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.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.