Finding the mod of large numbers

AI Thread Summary
To evaluate (16^1000 - 18^2000)(mod 17), first recognize that 16 mod 17 is -1 and 18 mod 17 is 1. This simplifies the expression to (-1)^1000 - 1^2000, which results in 1 - 1 = 0. The discussion emphasizes using Fermat's Little Theorem for simplification, noting that calculations must avoid calculators during exams. Ultimately, the solution is confirmed as 0 mod 17.
valianth1
Messages
5
Reaction score
0

Homework Statement



Evaluate (16^1000 - 18^2000)(mod 17)


Homework Equations



I'm not sure how to go about doing this, but I realize it has something to do with the pattern from the last digit obtained from the 2 large numbers


The Attempt at a Solution

 
Physics news on Phys.org
valianth1 said:

Homework Statement



Evaluate (16^1000 - 18^2000)(mod 17)


Homework Equations



I'm not sure how to go about doing this, but I realize it has something to do with the pattern from the last digit obtained from the 2 large numbers


The Attempt at a Solution


That's really not a great realization. I would think about what 16 and 18 are mod 17.
 
16(mod 17) = -1 and 18(mod 17) = 1, how do I go from here?
 
valianth1 said:
16(mod 17) = -1 and 18(mod 17) = 1, how do I go from here?

What's (-1)^1000-1^2000? (x mod 17)^n mod 17=(x^n) mod 17. Right?
 
Last edited:
Turns out 16(mod17) is 16, so how would I go about calculating 16^1000 seeing that the exam does not permit calculators? So would the solution be 16^1000 - 1^2000? So is the solution 15? Because using the calculator returns 0 which I don't think is right
 
How did you get 16(mod17) to be 16?

Consider that (-1)1000 = 1.Btw, since 17 is prime you can also apply Fermat's little theorem:
For any prime p: ap (mod p) = a

Rewrite 161000 as 1617k+r=(1617)k16r.
 
valianth1 said:
Turns out 16(mod17) is 16, so how would I go about calculating 16^1000 seeing that the exam does not permit calculators? So would the solution be 16^1000 - 1^2000? So is the solution 15? Because using the calculator returns 0 which I don't think is right

16 and (-1) are congruent mod 17 since they differ by 17. So (-1)^1000=16^1000 mod 17. You can use either form in your calculation. Which one makes it easy?
 
Back
Top