- #1
Fairy111
- 73
- 0
Homework Statement
Use the Fermat test to show that 513 is not a prime number.
Homework Equations
The Attempt at a Solution
What i have so far is:
n=513
Then i pick an 'a' with 1<a<n
Let a=8
So i need to compute a^(n-1) mod n
-> 8^512 mod 513
If 8^512 is not congruent to 1 mod 513, then i have shown 513 is not a prime number.
However i am stuck with how to do this.
Any help would be great thanks!