I compete in a math competition that allows an average of 7.5 seconds per question. The other day I came across this problem: $$47^{36} \equiv x \pmod{37}$$ Where I had to find $x$. I initially approached it by finding the remainder of the base, simplifying the expression to $$10^{36} \equiv x \pmod {37}$$ I had no idea what to do afterwards, so I just skipped the problem. Such problems occur frequently in the competition, typically with a prime modulus, which sort of implies there is a method to find $x$ in mere seconds.
-
9Look up Fermat's little theorem. These problems are always applications of it. When the exponent is one less than a prime modulus the answer is $1$ unless the base is divisible by the modulus. – Ross Millikan Apr 04 '24 at 23:37
-
2I agree that Fermat's Little Theorem is the best general method for problems like the one you gave, but in this particular case, if you remember that $37\times27=999$, you know that $10^3\equiv1\bmod{37}$, and the answer also follows right away from that – J. W. Tanner Apr 05 '24 at 00:26
1 Answers
There are plenty of applications of equivalence with prime moduli, but one of the most well-known is Fermat's Little Theorem. One cool fact about equivalence modulo primes is that the collection of equivalence classes $F_p = \mathbb{Z}/p\mathbb{Z}$ forms a structure called a finite field, and in fact, if you hand me a certain nonzero element $a$ of $F_p$, then the set $\{a,a^2,a^3,\dots,a^{p-1}\}$ is a list of all the nonzero equivalence classes of $F_p$.
One other thing that we get is $a^{p} \equiv a \pmod{p}$ which is true of any nonzero $a$. (I originally said this "follows" from the above information and made a few other statements which weren’t quite true---I jumped a lot of mathematical machinery there.) This is equivalent to saying that $a^{p-1} \equiv 1 \pmod{p}$. Careful: we're still assuming that $a \not \equiv 0 \pmod{p}$. What would happen if we didn't specify that? This result is sometimes known as "Fermat's little Theorem", and you can (and should!) read more about it sometime.
In your situation, $p = 37$ is prime, and $36 = 37 - 1$. Since $a = 47 \equiv 10 \pmod{37}$, we know that $a \not \equiv 0 \pmod{37}$ and so FlT applies to save us from a computational nightmare.
- 585
-
I like "flt" as an abbreviation for this theorem, reserving "FLT" for the more famous but rather less useful thing. – Brian Tung Apr 05 '24 at 00:28
-
That makes sense, and intentionally kept the “l” lower case, but capitalized F since it stands for someone’s name (I have no strong feelings on keeping T capitalized). I figure there’s some actual convention for distinguishing the two but I don’t know off the top of my head what it is. – Kyle Apr 05 '24 at 00:30
-
Please strive not to post more (dupe) answers to dupes of FAQs (& PSQs), cf. recent site policy announcement here. Please delete this question since we already have too many copies of these arguments, which makes it difficult to locate the best answers by search. You will need to unaccept the answer before deleting (click the checkmark). – Bill Dubuque Apr 05 '24 at 03:54
-
2@BillDubuque Thanks for pointing that out. I didn't know about the "dupe" Q/A policy, so that's on me. It seems like you've asked me to do things which don't make sense though, so I'm a bit confused about what I'm expected to do (e.g., I can't "unaccept the answer" because no answer seems to have been accepted, and I can't "delete the question" because I didn't even ask the question.) It looks like someone else has already closed the question though, so I'll just try to be more aware of this next time. – Kyle Apr 05 '24 at 05:16
-