Let q be a positive whole number.
Determine whether or not 1q + 2q + 3q + 4q is always divisible by 10 whenever q is NOT divisible by 4.
If q is not divisible by 4, it can be written as (4*k + r), with r in {1,2,3}.
The expression becomes 1 + 2^(4*k+r) + 3^(4*k+r) + 4^(4*k +4). We have
to prove this is equivalent to 0 when calculating modulo 10. The
totient of 10 is (5-1)x(2-1) = 4 (very convenient).
This means that our expression, when calculating modulo 10 is
equivalent to 1 + 2^r + 3^r + 4^r. Checking for all three possible
values of r gives the correct result of 0. For r=0, it is equivalent to
4, so for q divisible by 4, the number will always end with a 4.