221221+1=5 ends in 5.
Ifn>1, then 4∣2n and so 15=(24–1)∣(22n−1).
Hence 22n+1≡2(mod 5), and since 22n+1is odd, we must have 22n+1≡7( mod 10).
Therefore 22n+1 ends in 7 when n>1, and in 5 when n=1.