MathCastle
Number TheoryChallengeFermat, Euler and Wilson

Fermat, Euler and Wilson · Challenge problem

The number 561561 factors as 3⋅11⋅173 \cdot 11 \cdot 17. Find the remainder when 55615^{561} is divided by 561561.