Showing that the $n$-th positive integer that is not a perfect square is $n+\{\sqrt{n}\}$, where $\{\}$ is the "closest integer" function

670 Views Asked by At

Answering a question on sequences which asks to show

If $a_n$ denotes the $n$-th positive integer that is not a perfect square, then $$a_n = n + \{ \sqrt n \}$$ where $\{ x \}$ is the closest integer to the real number $x$.

I argued as follows:

Given a positive integer $n$, there is some positive integer $m$ such that $$m^2 - m + 1 \le n \le m^2 + m$$

and hence

$$\sqrt { m^2 - m + 1 } \le\sqrt n\le\sqrt{ m^2 + m }$$

Since

$$m -\frac12 < \sqrt{ m^2-m+1 }\,,\,\,\text{and}\;\; \sqrt{m^2 + m} < m + \frac12$$

then $$m - \frac12 < \sqrt n < m + 1/2$$ hence $\sqrt n = m$. By this, $$m^2 + 1 \le n + \sqrt n \le m^2 +2m$$ and no integer from $m^2 + 1$ to $m^2 + 2m$, inclusive, is a perfect square.

Now:

Is the first step (defining the $m$-based interval where $n$ lies) valid?

Thanks in advance :)

1

There are 1 best solutions below

3
On BEST ANSWER

The first step is certainly valid. The intervals $[m^2-m+1,m^2+m]$ partition the positive integers. Note that $$(m+1)^2-(m+1)+1=m^2+m+1.$$