A positive integer is magical if where and represent the floor and ceiling function respectively. Find the number of magical integers between 1 and 10,000, inclusive.
Solution
First of all, we have when is a perfect square and otherwise. Therefore, in the first case, the original equation holds if and only if is a perfect square itself, i.e., is a fourth power. In the second case, we need to satisfy the equation , which happens if and only if either or is a perfect square . Therefore, is magical if and only if for some (positive) integer . There are integers in this range. The range in the problem statement includes and the interval , so the total number of magical numbers 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.