# Pattern Recognition is the Best

Algebra Level 4

Let $$f(x)$$ be the least positive integer that can be added to $$x$$ to obtain a perfect square. For example,$$f(1) = 3 , f(2) = 2, f(3) = 1 , f(4) = 5 , f(5) = 4$$ and so on.

To what value of $$x$$, starting from $$x = 1$$, is the $$100^\text{th}$$ recurrence of 2017 as a function value?

×