I wanted to ask for a way to find primitve roots, because I didn't get it well. This is what I did:
For $n=338=2\cdot13^2$ we calculate $\varphi (\varphi(338))=\varphi(156)=\varphi(2^2\cdot3\cdot13)=48=3\cdot4^2$
$\Rightarrow$ there are $48$ possible primitive roots
For $1\le n \le156$ it is $\gcd(n,156)=1= \{1,5,7,8,9,10,11,14,...,155\}$
We know that the order is a divisor of $\varphi(338) \Rightarrow \operatorname{ord}\in \{1,2,3,4,6,13,156\}$
My question now is what exactly do I have to check ?
Something such that $x\equiv1\mod 338 $?
or anything else ?
Thanks in advance.