<s>[INST] Find all the primitive roots of $13$ 
Find all the primitive roots of $13$

My attempt:
Since that $13$ is a prime I need to look for $g$ such that $g^{13-1}\equiv 1\pmod{13}$
There are $\phi(12)=4$ classes modulo $12$
how can I find the classes?
 [/INST] My quick & dirty method was to note that $13-1=12$ has prime factors $2,3$ & quickly find squares and cubes of a numbers, since those cannot be primitive roots, and not checking those which have already turned up. Any indication  of a "short cycle" (like $5$) also gets discarded immediately.
$2: 2^2 \equiv 4, 2^3 \equiv 8 \\
3: 3^2 \equiv 9, 3^3 \equiv 1 \text{(discard all)}\\
5: 5^2 \equiv 12 \equiv -1 \text{(discard all)} \\
6: 6^2 \equiv 10, 6^3 \equiv 8 \\
7: 7^2 \equiv 10, 7^3 \equiv 5 \\
11: 11^2 \equiv 4, 11^3 \equiv 5 
$
leaving $\{2,6,7,11\}$ as the primitive roots which is in accordance with the expectation of $\phi(12)=4$ roots (and also the knowledge that for each primitive root $g \bmod p$, $-g$ is a primitive root iff $p \equiv 1 \bmod 4$).
</s>