A question about floor functions and series The sequence $\{a_n\}^{∞}_{n=1} = \{2,3,5,6,7,8,10,...\}$
consists of all the positive integers that are not perfect squares.

Prove that $a_n= n+ [\sqrt{n} + \frac{1}{2}]$.

Well, I managed to prove that
$ m^2 < n+ [\sqrt{n} + \frac{1}{2}] < (m+1)^2 $,
where $[\sqrt{n} + \frac{1}{2}] = m$.
But is this enough to answer the question? Or do we also need to prove that $n+ [\sqrt{n} + \frac{1}{2}] $ can take all non-perfect square values. If yes, then how?
Any help is appreciated, thanks!
 A: The increment $$a_{n+1}-a_n=1+\left\lfloor\sqrt{n+1}+\dfrac12\right\rfloor-\left\lfloor\sqrt{n}+\dfrac12\right\rfloor$$
is $1$, or $2$ when $\sqrt{n+1}$ rounds differently than $\sqrt n$.
A: The following is just a first step toward the answer.
From
$$
\eqalign{
  & a_{\,n}  = n + \left\lfloor {\sqrt n  + {1 \over 2}} \right\rfloor   \cr 
  & a_{\,n + 1}  - a_{\,n}
  = 1 + \left\lfloor {\sqrt {n + 1}  + {1 \over 2}} \right\rfloor
  - \left\lfloor {\sqrt n  + {1 \over 2}} \right\rfloor  \cr} 
$$
since we have
$$
\eqalign{
  & \left\lfloor {x - y} \right\rfloor  =  - \left\lceil {y - x} \right\rceil  =   \cr 
  &  = \left\lfloor x \right\rfloor  - \left\lfloor y \right\rfloor
  + \left\lfloor {\left\{ x \right\} - \left\{ y \right\}} \right\rfloor  =   \cr 
  &  = \left\lfloor x \right\rfloor  - \left\lfloor y \right\rfloor
  - \left[ {\left\{ x \right\} < \left\{ y \right\}} \right] \cr} 
$$
where $[P]$ denotes the Iverson bracket, then
$$
\eqalign{
  & a_{\,n + 1}  - a_{\,n}  = 1 + \left\lfloor {\sqrt {n + 1}  + {1 \over 2}} \right\rfloor
  - \left\lfloor {\sqrt n  + {1 \over 2}} \right\rfloor  =   \cr 
  &  = 1 + \left\lfloor {\sqrt {n + 1}  - \sqrt n } \right\rfloor
  + \left[ {\left\{ {\sqrt {n + 1}  + {1 \over 2}} \right\}
 < \left\{ {\sqrt n  + {1 \over 2}} \right\}} \right] =   \cr 
  &  = 1 + \left[ {\left\{ {\sqrt {n + 1}  + {1 \over 2}} \right\}
 < \left\{ {\sqrt n  + {1 \over 2}} \right\}} \right] \cr} 
$$
Now the Iverson bracket will be one, and thus we will have a jump in $a_{\,n}$, when
$$
\left\{ {\sqrt {n + 1}  + {1 \over 2}} \right\} < \left\{ {\sqrt n  + {1 \over 2}} \right\}
$$
which for $1 \le n$ , which means $sqrt{n+1} -\sqrt{n} < 1/2$, can occur only when
$$
\sqrt n  + {1 \over 2} < m < \sqrt {n + 1}  + {1 \over 2}
$$
with $m$ an integer, that is
$$
\eqalign{
  & \sqrt n  < m - {1 \over 2} < \sqrt {n + 1} \quad  \Rightarrow   \cr 
  &  \Rightarrow \quad n < m^{\,2}  + {1 \over 4} - m < n + 1\quad  \Rightarrow   \cr 
\quad  \Rightarrow   \cr 
  &  \Rightarrow \quad n - {1 \over 4} < m\left( {m - 1} \right) < n + {3 \over 4}\quad  \Rightarrow   \cr 
  &  \Rightarrow \quad n_ *   = m\left( {m - 1} \right) \cr} 
$$
Thus
$$
a_{\,n + 1}  - a_{\,n}  = 2\quad {\rm iff}\quad n = m\left( {m - 1} \right)
$$
It remains then to demonstrate that
$$
\forall q\;\exists m:\quad a_{\,n_{\, * } }  + 1
 = m\left( {m - 1} \right) + \left\lfloor {\sqrt {m\left( {m - 1} \right)}
  + {1 \over 2}} \right\rfloor  + 1 = q^{\,2} 
$$
