Modulo Reduction Using Fermat's Little Theorem

  • Thread starter Thread starter scottstapp
  • Start date Start date
  • Tags Tags
    Reduction
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
scottstapp
Messages
40
Reaction score
0

Homework Statement



Reduce 34567 modulo 19.

Homework Equations





The Attempt at a Solution


I approached by first reducing 4567 modulo 18.

I got the following: 34567= 318*253+13=(318)253*313 congruent to 12531594323 congruent to 14 mod 19

Is this the correct approach? I am not sure where 14 came from in the end I just guess and checked until I found a value that worked which was 14. Any explanations on how to correctly find 14?
 
Physics news on Phys.org
You were exactly right to use Fermat's Little Theorem to show that 34567 = 313 mod 19. From there I'd use binary exponentiation: 313 = 38+4+1 = 3834*3.

So mod 19, 34 = 5, so then 38 = 3434 = 25 mod 19 = 6 mod 19.

Put it together: 3834*3 = 6*5*3 mod 19 = 90 mod 19 = 14.