# integer part: $[\sqrt{a}]+f(a)=\frac{1+\sqrt{1+4a}}{2}$

Let $k$ be a natural number and $a \in [k^2, (k+1)^2).$

Prove that:

$$[\sqrt{a}]+f(a)=\frac{1+\sqrt{1+4a}}{2},$$

where $f(a)=0$ if $a \in [k^2, k^2+k)$ and $f(a)=1$ if $k \in [k^2+k, (k+1)^2).$

It seems complicated for me, I wrote what means integer part $[\cdot]$, I tried to combine some relations, but nothing concretely.

Thanks :)

-
This is clearly false as stated, since the lefthand side is always an integer, and the righthand side is not. Do you mean the righthand side to be $$\left\lfloor\frac{1+\sqrt{1+4a}}2\right\rfloor\;?$$ –  Brian M. Scott Jan 26 '13 at 22:14
@BrianM.Scott. Now, I saw. It's seems to be incorrect(I write exactly how I saw in book.). If there is $[\frac{1+\sqrt{1+4a}}{2}]$ is ok ? is it possible the exercise ? –  Iuli Jan 26 '13 at 22:17
Yes, now it should be possible. I’ve done half of it in the answer; I’ll leave the rest to you. –  Brian M. Scott Jan 26 '13 at 22:19

I’m assuming that the righthand side should be

$$\left\lfloor\frac{1+\sqrt{1+4a}}2\right\rfloor\;.$$

Since $k^2\le a<(k+1)^2$, you know that $\left\lfloor\sqrt a\right\rfloor=k$. Thus,

$$\left\lfloor\sqrt a\right\rfloor+f(a)=\begin{cases} k,&\text{if }k^2\le a<k^2+k\\ k+1,&\text{if }k^2+k\le a<(k+1)^2\;. \end{cases}$$

Now what about $$\left\lfloor\frac{1+\sqrt{1+4a}}2\right\rfloor\;?$$

If $k^2\le a<k^2+k$, then $$(2k)^2<4k^2+1\le 4a+1<4k^2+4k+1=(2k+1)^2\;,$$ so $$2k<\sqrt{1+4a}<2k+1\;,$$ and therefore

$$k+\frac12<\frac{1+\sqrt{1+4a}}2<k+1\;;$$ this implies that $$\left\lfloor\frac{1+\sqrt{1+4a}}2\right\rfloor=k\;,$$ as desired.

I’ll leave the other case to you.

-