4

I have to find the remainder of the division of $7^{1203}$ by $143$. I thought that I could use the Euler Theorem: Let $a \in \mathbb{Z}$ and $n \in \mathbb{N}$.We also know that $(a,n)=1$.Then $a^{\varphi(n)} \equiv 1 \mod n$ So,we set $a=7$ and $n=143$ and see that $(a,n)=1$.So,from the above theorem,we get that $7^{120} \equiv 1 \mod 143$. $$7^{1203} \mod 143=7^{10 \cdot 120+3} \mod 143=(7^{120})^{10} \cdot 7^{3} \mod 143=7^{3} \mod 143=57$$ So the remainder of the division of $7^{1203}$ by $143$ is $57$.Is that what I have done right or have I done something wrong??

Bill Dubuque
  • 282,220
evinda
  • 8,037
  • 5
    $143=11 \times 13$, find the remainder mod $11$ and $13$ first .. then I think you will get your answer :) – r9m Mar 08 '14 at 01:03
  • 1
    Could you explain it further to me?Also,is the way that I did it wrong?? – evinda Mar 08 '14 at 01:05
  • 1
    What you have done is correct ... I was just pointing out another alternative :) – r9m Mar 08 '14 at 01:09
  • 1
    evinda, you have applied Euler's theorem correctly and obtained the correct answer 57. There is no need to work with the factors of $n$ directly (indirectly they have been used to find $\varphi(n)$). – P Vanchinathan Mar 08 '14 at 01:11
  • 1
    The first sentence of the last paragraph is incomplete - there is no verb or result. – Thomas Andrews Mar 08 '14 at 01:30
  • I think you'll find modular exponentiation much faster than factoring, and that all these approaches are contrived and misleading. Contrived contest questions can mislead you about the nature of more natural mathematics. – DanielV Jan 24 '15 at 16:59
  • 1
    @BillDubuque, in my opinion you should reopen this question. It was posted more than two years before https://math.stackexchange.com/questions/2033639/mod-of-numbers-with-large-exponents-modular-order-reduction. – Gonçalo Jul 21 '24 at 06:34
  • @Gonçalo Dupes are linked to the canonical dupe target. That's the way SE works. Optimal site organization has little to do with temporal order. I noticed this dupe because someone posted a new answer (now deleted). – Bill Dubuque Jul 21 '24 at 06:55
  • 1
    @BillDubuque, thanks for your reply. I believed that temporal order matters, because when I vote to close a question for being a duplicate, I see the following description: "This question has been asked before and already has an answer." – Gonçalo Jul 21 '24 at 07:09
  • 1
    @Gonçalo There are many, many older questions closed as dupes of newer questions. This is standard procedure - see e.g. discussion on our meta or the SE meta. – Bill Dubuque Jul 21 '24 at 07:20

1 Answers1

4

Everything was done correctly. The following is an "improvement" that is not needed in this case.

Imagine working separately modulo $11$ and $13$. We have $7^{10}\equiv 1\pmod{11}$ and $7^{12}\equiv 1\pmod{13}$. Note that $60$ is the lcm of $10$ and $12$. It follows that $7^{60}\equiv 1$ modulo $11$ and $13$, and hence modulo $143$.

If your exponent has been $1263$ instead of $1203$, this observation would have saved a significant amount of time.

Note that the more distinct prime divisors the modulus $n$ has, the more we tend to save by using this type of trick.

André Nicolas
  • 514,336