The remainder when (2222)5555 is divided by 7
5
(6) 2222 ≡ 3 mod 7 [ a ≡ b mod n means a - b is divisivel by n ]
(2222)3≡ 27 mod 7 ≡ -1 mod 7
( but 27 ≡ -1 mod 7 )
⇒ (2222)5553≡(−1)1851 mod 7 ≡ -1 mod 7
(2222)2≡ 9 mod 7
(2222)5555≡ -9 mod 7 ≡ 5 mod 7
(but -9 ≡ 5 mod 7 )