Number theoryDifficulty 5.2AIME, harderFind the answer
Given a positive integer k, let \|k\| denote the absolute difference between k and the nearest perfect square. For example, \|13\|=3 since the nearest perfect square to 13 is 16. Compute the smallest positive integer n such that n∥1∥+∥2∥+⋯+∥n∥=100.
A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.
Solution
Note that from n=m2 to n=(m+1)2,∥n∥ increases from 0 to a peak of m (which is repeated twice), and then goes back down to 0. Therefore ∑n=1m2∥n∥=∑k=1m−12(1+2+⋯+k)=∑k=1m−12(2k+1)=2(3m+1)=3m(m2−1). In particular, if n=m2−1, n∥1∥+∥2∥+⋯+∥n∥=3m so n=3002−1 satisfies the condition. However, this does not prove that there are not smaller solutions for n. Let N=3002−1 and suppose that N−k satisfies the condition. Then, we know that k∥N∥+∥N−1∥+⋯∥N−(k−1)∥=100. Since \|N-k\|=k+1 for k≤298, one can show that k=199 works. By looking at further terms, one can convince oneself that no larger value of k works. Thus, the answer is 3002−1−199=90000−200= 89800.
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.
Source: Omni-MATH,
licensed Apache-2.0.
Statement and solution reproduced as published; topic and difficulty added by this site.