Prove that:
g is a generator of Fp* if and only if g^(p-1) = 1 (mod p) and gq ≠ 1 (mod p) for all prime divisors q of (p – 1).
I am thinking about applying Fermat's theorem...but don't know how...
Request help, thanks.
I know that if n is odd and has k distinct prime factors, then the number of roots, x^2 = 1 (mod n), is equal to 2^k.
However, I don't know how to give a formal proof to it.
I simply want to bypass the generalized form x^2 = a (mod n).
How can I prove it directly?
Thank you.