Problem

Source:

Tags: floor function, quadratics, function, pen



Let $p$ be a prime number of the form $4k+1$. Show that \[\sum^{p-1}_{i=1}\left( \left \lfloor \frac{2i^{2}}{p}\right \rfloor-2\left \lfloor \frac{i^{2}}{p}\right \rfloor \right) = \frac{p-1}{2}.\]