2222  2100 = 122, 122  70 = 52, 52  49 = 3, so 2222%7 = 3. 3^6 == 1 (mod 7), 5555  4800 = 755, 755  720 = 35, 35  30 = 5, so 5555%6 = 5. 2222^5555 = 3^5 == 5 (mod 7). (The mod reduction is a bit longwinded, but I wanted to do this without electronic aid)
Same for 5555^2222 == 4^2 == 2 (mod 7).
5 + 2 == 0 (mod 7)
Iirc, Paul Leyland has something to say about the more general question.
Alex
Last fiddled with by akruppa on 20070604 at 15:51
Reason: fixed /spoiler
