Proof of the remarkable formula for the n-th non-square?

242 Views Asked by At

The OEIS's A000037 entry makes the remarkable claim that every non-square number is given by the sequence $$a(n) = n + \Big\lfloor \frac 12 + \sqrt n\Big\rfloor$$ After looking through the entry, I couldn't find anything that looked like a proof or a link to one. Is there a simple proof of this?