Again Sum with floor

For discussing Olympiad Level Number Theory problems
mutasimmim
Posts:107
Joined:Sun Dec 12, 2010 10:46 am
Again Sum with floor

Unread post by mutasimmim » Sat Oct 18, 2014 10:25 am

Let $p$ be an odd prime and $q$ be a positive integer that is not divisible by $p$. Show that
\[\sum_{k=1}^{p-1} \left\lfloor (-1)^k\cdot\frac{k^2q}{p}\right\rfloor=\frac{(p-1)(q-1)}{2}\]

Post Reply