# Prove that $\lfloor \sqrt{(p-1)p} \rfloor = p - 1$ and likewise $\lceil \sqrt{(p-1)p} \rceil = p$.

Here $$p$$ is prime but is not necessary for the problem just that $$p \ge 0$$. I suspect that a statement like $$p-1 \le \sqrt{(p-1)p} \le p$$ would be the case but I am not certain how to establish this condition.

• We need that $p\ge 1$, since otherwise the square root is not defined. That is also a sufficient condition. – Klaas van Aarsen Dec 12 '18 at 17:48

For $$p>1$$,$$(p-1)^2=p^2-2p+1 and
$$p-1<\sqrt{(p-1)p}
$$p-1\le\left\lfloor\sqrt{(p-1)p}\right\rfloor\le\left\lceil\sqrt{(p-1)p}\right\rceil\le p.$$
Hint: $$(p-1)^2 \le (p-1)p \le p^2$$ for $$p \ge 0$$