The primitive root 'g' of a prime number is such that 'p' and 'g' are COPRIME i.e. GCD(p,g)=1.
and is congruent to a power of g modulo n.
Ex.
Here we see that the period of 3k modulo 7 is 6. The remainders in the period, which are 3, 2, 6, 4, 5, 1, form a rearrangement of all nonzero remainders modulo 7, implying that 3 is indeed a primitive root modulo 7.
Ex. Table for Primitive root for some numbers
| 2 | 1 |
| 3 | 2 |
| 4 | 3 |
| 5 | 2, 3 |
| 6 | 5 |
| 7 | 3, 5 |
| 9 | 2, 5 |
| 10 | 3, 7 |
| 11 | 2, 6, 7, 8 |
| 13 | 2, 6, 7, 11 |