ΘρϵηΠατπ

Order
Suppose that n∈ℕ1 and a∈cop⁡(n), then we define o(a,n):=min⁡({k∈ℕ1:ak≡1(modn)})
Order Exists iff There is a Power that Yields 1
As per title.
Suppose that on⁡(a) exists, then we have at least one power that yields one. On the other hand if we have some power that yields one, then the set {k∈ℕ1:(ak % n)=1} is non-empty so that the min exists.
Order Exists iff Coprime
We have that a∈cop⁡(n) iff o(a,n) exists

If a∈cop⁡(n) then by euler's theorem we know that aϕ(n)≡1(modn) therefore the order exists.

On the other hand if the oreder exists, then we have some ak≡1(modn), now recall that ax≡1(modn) has a solution if and only if a∈cop⁡(n), but note we have a solution, becuase if k=1 then x=1 works, otherwise if k≥2 then x=ak−1 works therefore we have a solution in any case so that a∈cop⁡(n) as needed.

Primitive Roots are a Subset of Coprimes
pr⁡(n)⊆cop⁡(n)
If a∈pr⁡(n) then a has an order, but a has an order iff a∈cop⁡(n), note that not everything that has an order is a primitive root.
Every Prime number has a Primitive Root
For any p∈ℙ, pr⁡(p)≠∅

Suppose for the sake of contradiction that it had no primitive roots therefore for any a∈[1,…,p−1] that d:=o(a,p)<ϕ(p)=p−1, but at the same time we know that d|p−1.

Now focusing on a for a moment, we see that for any k∈[1,…d] we have o(ak,n)=dgcd⁡(d,k)=d⟺gcd⁡(d,k)=1 so there are at least phi(d) elements (using powers of a ) that have order d, and noting that since a,a2,…,ad are distinct mod p, then so are these elements.

By lagranges theorem, the polynomial xd−1 has at most d roots modulo p

Connection Between Primitive Roots of pk and 2 pk
Let p∈ℙ3, k∈ℕ1 and a∈pr⁡(pk) a∈pr⁡(2pk)⟺a∈ℤodd⁡

Suppose that a∈pr⁡(2pk) then a∈cop⁡(2pk), therefore a cannot be even, so that it must be odd.

Now suppose that a∈ℤodd⁡ but for the sake of contradiction that a∉pr⁡(2pk) therefore m:=o⁡(a,2pk)<ϕ(2pk)=ϕ(pk) and am≡1(mod2pk) then we have am≡1(modpk), but a∈pr⁡(pk) therefore o⁡(a,pk)=ϕ(pk) but we have that m<ϕ(pk) which is impossible because the order is the smallest power the yields one, but we've found a smaller one.

Order of a Primitive Root mod the next Power
Let p∈ℙ and k∈ℕ1 and suppose that a∈pr⁡(pk) then opk+1(a)∈{ϕ(pk),ϕ(pk+1)}
When a Primitive Remains a Primitive Root mod the next Power
Suppose a∈pr⁡(pk) and opk+1(a)≠opk(a) then a∈pr⁡(pk+1)
Every Power of an odd Prime has a Primitive Root
Let p∈ℙ3 be an odd prime, then pk has a primitive root for every k∈ℕ1.
Classification of the Existence of Primitive Roots
Let n∈ℕ2, then pr⁡(n)≠∅ iff n∈2,4,pk,2pk where p∈ℙ3 and k∈ℕ1.
A Number to the Phi n over Two is Congruent to 1 When it is not a Primitive Root
Let n∈ℕ3 such that pr⁡(n)=∅, and c∈cop⁡(n), then we have cϕ(n)2≡1(modn)

Since pr⁡(n)=∅ then n∉{2,4,pk,2pk} for some p∈ℙ3 and k∈ℕ1.

We will deal with the case when n=2k for k∈ℕ3, we know that cϕ(n)≡1(modn) and that ϕ(n)=ϕ(2k)=2k−1 and therefore on(c)=2j for some j∈[1,…,k−1], clearly we see c∉∅=pr⁡(n) and so we know that j≠k−1 because in that case we would have that on(c)=ϕ(2k−1) which implies that pr⁡(n)≠∅ which is a contradiction. This proves that on(c)=2j|2k+1=ϕ(n)2 and therefore we have that cϕ(n)2≡1(modn).