1. ## Fermat's Theorem

I was wondering if someone might be able to look over my proof's involving Fermat's Theorem.

When n = 2p, where p is an odd prime, then a^(n-1)= a (mod n) for any integer a.
So let n=2p
We have a^(2p-1)
a^(2p)*1/a
a^2a^p*1/a
a^2*1/aa^p
a^(2-1)a^p
aa^p
Then from Fermat's Theorem, a^p=a mod p and thus a^(2p-1)=a(mod2p)

For n = 195 = 3 * 5 * 13, we have a^(n-2) = a (mod n) for any integer a.
Then we have a^193
Since 193 is a prime, we have a^193=a mod 193 by Fermat's Theorem and thus a^193=a (mod195)

2. Originally Posted by mathematic
I was wondering if someone might be able to look over my proof's involving Fermat's Theorem.

When n = 2p, where p is an odd prime, then a^(n-1)= a (mod n) for any integer a.
So let n=2p
We have a^(2p-1)
a^(2p)*1/a

This last step is legal only if $\displaystyle a\neq 0\!\!\pmod n$

a^2a^p*1/a
a^2*1/aa^p

How?? Perhaps you meant $\displaystyle a^2\cdot\frac{1}{a}\cdot a^p$? Otherwise it's wrong.

a^(2-1)a^p
aa^p
Then from Fermat's Theorem, a^p=a mod p and thus a^(2p-1)=a(mod2p)

Don't get it: you had $\displaystyle aa^p$ ,and applying flt, you get $\displaystyle aa^p=a^2\!\!\pmod p$ . How

does this translate into modulo 2p?

Tonio

For n = 195 = 3 * 5 * 13, we have a^(n-2) = a (mod n) for any integer a.
Then we have a^193
Since 193 is a prime, we have a^193=a mod 193 by Fermat's Theorem and thus a^193=a (mod195)
.

3. so if a^(2p)*1/a isn't valid, how might I work around that?

Yeah I meant a^2*(1/a)*a^p