It is: , right?

(a)

Thus:

Now consider the different cases(b)

- If we have
- If we have
- Otherwise neither nor is a multiple of k, thus

Multiplying

Thus:

Now by this post http://www.mathhelpforum.com/math-help/number-theory/33568-stumped-again.html

we can say that

Recall the identity:

Therefore: