0

We know from Fermat's little theorem that $$ 15^{42} \equiv 1 \mod{43} $$ since 43 is a prime number and $43 \nmid 15$. Could I use this fact to calculate $15^{41} (mod\ 43)$? My first impression tells me that I can not divide by 15, since is 15 is not a factor of the right hand side.

Bill Dubuque
  • 265,059
  • 37
  • 279
  • 908
Nick
  • 332
  • 2
  • 8

1 Answers1

0

You can multiply the modular inverse of $15 \pmod {43}$. This exists since $gcd(15,43) = 1$. So we have $$ 15^{42}\equiv 1 \pmod {43} \Leftrightarrow 15^{41} \equiv 1\cdot (15)^{-1}\pmod {43} \equiv 23\pmod{43}.$$

mathquester
  • 140
  • 9
  • Did you use Euclid's algorith to calculate $(15)^{-1}$? – Nick Feb 14 '23 at 10:18
  • 1
    @Nick In this case it can be done by guessing. But in general you would want to use the (advanced) Euclid Algorithm – mathquester Feb 14 '23 at 10:44
  • And indeed, you *should* try yourself the extended Euclidean algorithm to find that $$ -20\cdot 15+7\cdot 43=\gcd(15,23)=1, $$ so that $-20=23$ is the inverse of $15$ modulo $43$. – Dietrich Burde Feb 14 '23 at 20:29
  • Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement [here](https://math.meta.stackexchange.com/q/33508/242). – Bill Dubuque Feb 14 '23 at 20:32