Suppose first that pq is even (which implies that p and q have
opposite parities), and let
ak=(−1)⌊pk⌋+⌊qk⌋. We show that
ak+apq−1−k=0, so the terms on the left-and
side of (∗) cancel out in pairs.
For every positive integer k we have
{pk}+{pp−1−k}=pp−1, hence
⌊pk⌋+⌊ppq−1−k⌋=pk−{pk}+ppq−1−k−{ppq−1−k}=ppq−1−pp−1=q−1
and similarly
⌊qpq−1−k⌋+⌊qk⌋=p−1.
Since p and q have opposite parities, it follows that
⌊pk⌋+⌊qk⌋ and
⌊ppq−1−k⌋+⌊qpq−1−k⌋ have opposite parities and
therefore apq−1−k=−ak.
Now suppose that pq is odd. For every index k, denote by pk
and qk the remainders of k modulo p and q, respectively.
(I.e., 0≤pk<p and 0≤qk<q such that
k≡pk(modp) and k≡qk(modq).) Notice that
⌊pk⌋+⌊qk⌋≡p⌊pk⌋+q⌊qk⌋=(k−pk)+(k−qk)≡pk+qk(mod2).
Since p and q are co-prime, by the Chinese remainder theorem the
map k↦(pk,qk) is a bijection between the sets
{0,1,…,pq−1} and
{0,1,…,p−1}×{0,1,…,q−1}. Hence
k=0∑pq−1(−1)⌊pk⌋+⌊qk⌋=k=0∑pq−1(−1)pk+qk=i=0∑p−1j=0∑q−1(−1)i+j=(i=0∑p−1(−1)i)⋅(j=0∑q−1(−1)j)=1.