Problem statement:
Let $\mathbb{Z}_{77}^{*}$ be a multiplicative group of integers modulo $p=77$. Check if $g=17$ generates the group. If it does not, state the order of the generated subgroup.
Solution attempt:
We note that $p=77$ is not prime. I read that good ol' Gauss (1986) proved that a multiplicative group modulo $p$ is cyclic iff $p$ is of the form $p=2$, $p=4$, $p=q^k$, or $p=2q^k$, where $q$ is an odd prime and $k \geq 1$. I do not know why, but with that said we can conclude that $\mathbb{Z}_{77}^{*}$ is not cyclic as $p=77$ cannot be written in any of those forms. As such, there exists no primitive root mod $p$ that generates the group.
So, what remains is to figure out the size of the subgroup that $g=17$ generates.
I have understood it that the order of $g$ is defined to be the smallest positive integer $k$ such that $g^k \equiv 1 \mod p$. We also recall that according to Lagrange's Theorem, $H$ is a proper subgroup of a finite group $G$ iff the order of $H$ divides the order of $G$.
The order of $\mathbb{Z}_{77}^{*}$ is $\phi(77) = 60$. Possible subgroups orders are therefore the divisors of $60$ which are $\{1,2,3,4,5,6,10,12,15,20,30,60\}$. We ignore $1$ and $60$ as they correspond to the standard subgroups $\mathbb{Z}_{77}^{*}$ and $\{e\}$.
Evaluating $17^{d} \mod 77$ for each divisor $d$ yields $d=30$ as the correct answer. Thus, we conclude that the order of $g$ is $30$.
Questions:
Note that I have a very shallow background in modular arithmetics and Group Theory. As such, feel free to include in your answers more details rather than less.
Where does the definition of the "order of $g$" come from, and how can I think of it intuitively? I don't understand what it means for $g^{d} \mod p$ to evaluate to $1$ or something other than that.
I found this math.stackexchange answer which suggests that one does NOT need to try all the divisors, but rather only a subset of them. Is this true, and if so, why?