Problem:
Given a positive integer , let denote the absolute difference between and the nearest perfect square. For example, since the nearest perfect square to is . Compute the smallest positive integer such that
Proposed by: Carl Schildkraut
, 2022
Solution
Solution:
Note that from to , increases from to a peak of (which is repeated twice), and then goes back down to . Therefore
In particular, if ,
so satisfies the condition. However, this does not prove that there are not smaller solutions for .
Let and suppose that satisfies the condition. Then, we know that
Since for , one can show that works. By looking at further terms, one can convince oneself that no larger value of works. Thus, the answer is .
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.