Quote (Bloo_Guardian @ Jan 29 2016 02:42am)
So after this point you get that gcd(x,p) = 1? Hence we can use FLT?
Since p is prime, gcd(x,p) = 1 or p.
If it's 1, FLT states that : x^(p-1) = 1 [p].
If it's p (ie : if x is a multiple of p), FLT only states that : x^p = x [p] (which is obvious).
I checked that gcd(x,p)=1 just to be able to use the strongest version of FLT.