The stated problem is equivalent to showing that
which is equivalent to showing that 10 divides
.
To do this, we break this into cases. Since we are looking modulo 10, we only have to discuss the cases when
since all numbers reduce to one of these modulo 10. We proceed as suggested by the hints.
Case 1:
. This case clearly satisfies
by a simple substitution. We suppose that a is positive.
Case 2:
. In this case, notice that clearly 2 divides
so it suffices to show that 5 divides
. Notice that 5 does not divide a and so
. Thus Euler's Theorem applies giving us that
.
Hence
Thus, 5 divides
and so 10 divides
.
Case 3:
. In this case, notice that clearly 5 divides
so it suffices to show that 2 divides
. This last number is even since
is odd. Thus 10 divides
.
Case 4:
and
. In this case,
. Thus Euler's Theorem applies giving us that
.
Hence
Thus 10 divides
completing the proof.