A question on floor function.

82 Views Asked by At

Prove that for $n \in N$,

$[\sqrt{n} + \frac{1}{2} ] = [\sqrt{n-\frac{3}{4}} + \frac{1}{2}]$

where [.] is the greatest integer function.

My attempt: k < $\sqrt{n} + \frac{1}{2} $ < k+1 . Obviously, $\sqrt{n-\frac{3}{4}} + \frac{1}{2}$ < $\sqrt{n} + \frac{1}{2} $,

so it would suffice to show that $\sqrt{n-\frac{3}{4}} + \frac{1}{2}$> k , but it turns out that the inequlity is very weak so i am not able to prove it.

Is there any way to do this using induction? Or am i trying the right thing?

Any help is appreciated , thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

We have, where $k$ is the integer part of $\sqrt{n} + \frac{1}{2}$,

$$\begin{equation}\begin{aligned} k & \lt \sqrt{n} + \frac{1}{2} \\ k - \frac{1}{2} & \lt \sqrt{n} \\ k^2 - k + \frac{1}{4} & \lt n \end{aligned}\end{equation}\tag{1}\label{eq1A}$$

Since $k$ and $n$ are positive integers, \eqref{eq1A} can actually be restated as being

$$\begin{equation}\begin{aligned} k^2 - k + 1 & \le n \\ k^2 - k + \frac{1}{4} & \le n - \frac{3}{4} \\ \left(k - \frac{1}{2}\right)^2 & \le n - \frac{3}{4} \\ k - \frac{1}{2} & \le \sqrt{n - \frac{3}{4}} \\ k & \le \sqrt{n - \frac{3}{4}} + \frac{1}{2} \end{aligned}\end{equation}\tag{2}\label{eq2A}$$

Since $\sqrt{n} + \frac{1}{2} \gt \sqrt{n - \frac{3}{4}} + \frac{1}{2}$, as you stated, this shows $k$ is also the integer part of $\sqrt{n - \frac{3}{4}} + \frac{1}{2}$, which means that

$$\left\lfloor \sqrt{n} + \frac{1}{2} \right\rfloor = \left\lfloor \sqrt{n - \frac{3}{4}} + \frac{1}{2} \right\rfloor \tag{3}\label{eq3A}$$