We have , where is the Carmichael function. So we have
The powers of 5 modulo 6 follow a periodic pattern
and so on, with odd powers of 5 equivalent to 5 modulo 6. So
The rest is easy to deal with. We have
and so the answer is 19.
6.6m questions
8.7m answers