Since it is even we can write, by Euler,

n=2^{k-1}*(2^k-1) ---> Note k must be a prime.

Trivial for k=2. Assume k>2.

Divide the proof into two cases.

Case IIf k=4j+1 then just by working modulo 10 you find that n = 6 (mod 10).

Case IIIf k=4j+3 then just be working modulo 10

you find that n = 8 (mod 10).