Question
Calculate $2^{125}$ mod 127 using any method you choose. (Hint: 127 is prime.)
Step 1
In other words, a^(p-1) ≡ 1 (mod p). In our case, p = 127, so we have 2^(127-1) ≡ 1 (mod 127). Now, we want to find 2^125 (mod 127). We can rewrite 2^125 as 2^(126-1). Using Fermat's Little Theorem, we know that 2^126 ≡ 2 (mod 127). Show more…
Show all steps
Your feedback will help us improve your experience
Katherine Mcgovern and 90 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Solve the congruence x^329 ≡ 452 (mod 1147). [Hint. 1147 is not prime.]
Find the prime factorization of each number. If the number is prime, state this. $$ 115 $$
Introduction to Algebraic Expressions
Fraction Notation
Find the prime factorization of each number. If the number is prime, state this. $$ 120 $$
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD