Question 31
Find the natural numbers $m$, $n$, $p$ ($m, n \ge 1$, $p \ge 2$, $n$ odd), which simultaneously satisfy the equations
$$
p + p^2 + \dots + p^n = m^2 \quad \text{and} \quad \lfloor \sqrt{p} \rfloor + \lfloor \sqrt{p^2} \rfloor + \dots + \lfloor \sqrt{p^n} \rfloor = m^2 - 5m.
$$
$$
p + p^2 + \dots + p^n = m^2 \quad \text{and} \quad \lfloor \sqrt{p} \rfloor + \lfloor \sqrt{p^2} \rfloor + \dots + \lfloor \sqrt{p^n} \rfloor = m^2 - 5m.
$$