0

I'm trying to find the solution to $10^n = 1 \bmod 13$.

I know from Fermat's little theorem that $n = 12k$ is a solution, however I can also manually see that $n = 6k$ is a solution, $k$ being any integer. How can I see this solution without calculating manually.

Thanks.

Asaf Karagila
  • 393,674
jw7
  • 3

1 Answers1

2

Hint: Note that $10\equiv-3\pmod{13}$, so what is $10^3\pmod{13}$?


There are three ideas that I used to reduce the manual calculations here:

  1. As you note $n=12k$ is a solution. And in fact $n=12$ is a solution. If there is a smaller positive solution, then it divides $12$, so it is one of $1$, $2$, $3$, $4$ or $6$.

  2. It is often easier to compute powers of $-a\pmod{p}$ instead of powers of $a\pmod{p}$ if $-a\pmod{p}$ is 'smaller' than $a\pmod{p}$. Powers of $-3$ don't grow as fast as powers of $10$, so it is less work to compute and reduce mod $13$.

  3. If $b^n\equiv-1\pmod{p}$ then of course $b^{2n}\equiv1\pmod{p}$.

In this particular case it is 'easy to see' that $$10^3\equiv(-3)^3\equiv-27\equiv-1\pmod{13},$$ so $n=6$ is the smallest positive solution, and the solutions are precisely all multiples of $6$.

Servaes
  • 63,261
  • 7
  • 75
  • 163
  • So a solution $n<p-1$ exists, if there is a solution for n to $a^n = -1 mod p$. Is there a generic criterion for this. – jw7 Oct 12 '20 at 20:28
  • In general you have $(-1)^2\equiv1\pmod{p}$, so if $a^n\equiv-1\pmod{p}$ then the order of $a$ divides $2n$. There is not much more to it, sometimes it just happens to be easy to see that $a^n\equiv-1\pmod{p}$. – Servaes Oct 12 '20 at 20:35
  • So $a^n\equiv-1\pmod{p}$ would have to been seen numerically first? – jw7 Oct 12 '20 at 20:38
  • Also, sometimes it is easier to compute powers of $-a\pmod{p}$ instead of $a\pmod{p}$, as it is here. It often is easier to do so when $-a\pmod{p}$ is closer to $0$ than $a\pmod{p}$. – Servaes Oct 12 '20 at 20:42
  • ok thanks, I just wanted to make sure I wasn't overthinking things. – jw7 Oct 12 '20 at 20:46
  • Not necessarily. 10^2 = 9 (mod 13) has order 3. In fact, any element with odd order will not hit -1. What you said is true for elements of even order, since the only "square roots" of 1 are -1 and 1. – Joshua Malco Oct 12 '20 at 20:46