I have a problem here that I have no idea how to go about solving. It states: Let $n∈Z$ with $n>1$.
(a) If $n=2k$ for some odd integer $k$, prove that $k^3≡k \pmod{2n}$.
(b) If $n=2k$ for some even integer $K$, prove that $k^2≡0 \pmod n$.
I only have knowledge of proofs using mathematical induction. However, I have the section of the book open but I'm still not getting any ideas of how to solve the problem.
Hint: For a) take $k=2m+1$ and look at how $k^3$ looks like.