Question about working in modulo? This question is in essence asking for understanding of a step in Fermats theorem done Group style. 
For any field the nonzero elements form a group under field multiplication. So let us take the Field $Z_p$. The group $Z_p$ - {0} form a group under field multiplication. 
This is my question. For any group $G$, let $a$ be an element of $G$, then 
$1)$$H$ = {$a^n$| $n$ is an element of $Z$}
If we are working in $Z_p$ does that mean we can restrict the $n$ in equation 1 to just the elements from $0$ to $p-1$? 
Thanks yall

It is a theorem that a finite subgroup of the nonzero elements of a field is cyclic, and as a corollary, the nonzero elements of a finite field form s cyclic group. 
If the field is size n, the subgroup is size $n-1$, and yes, the first n powers of any element suffice to generate the cyclic subgroup generated by an element. In fact, even that is overkill, often.
