# How do I use Fermat's Little Theorem to solve the following:

$$x^{13}$$ = 2 mod 23. I know how to use the Fermat's theorem, but in this case, we don't know the value of "a". So I am unsure of how to even start?

Here all I know is that p = 23 and thus $$a^{22}$$ = 1 mod 23

• What do you mean????????????
– user717038
Nov 7, 2019 at 23:15
• What is the problem to be solved here? Find $x$? Nov 7, 2019 at 23:18
• Yeah it just says to solve the equation
– user717038
Nov 7, 2019 at 23:34

Since $$13\times17=221\equiv1\bmod22,$$

$$x^{13}\equiv2\bmod23\implies x^{13\times17}\equiv x\equiv 2^{17}\bmod 23.$$

• Note: $x^{13\times17}\equiv x$ follows from Fermat's Little Theorem, which says $x^{22}\equiv1\bmod23$; $2^{11}\equiv1\bmod23$ so $x\equiv2^6=64\bmod 23$ Nov 7, 2019 at 23:31
• So this means $64^{13}$ divided by 23 will give me a remainder of 2?
– user717038
Nov 7, 2019 at 23:58
• @SanchitKumar: that is correct Nov 8, 2019 at 0:02
• Ok so is there a formal way you came up with that 17?
– user717038
Nov 8, 2019 at 0:10
• I inverted $13$ modulo $22$ Nov 8, 2019 at 0:12