I have a really silly question.
$\mathbb{Z},+,\cdot$ is a HID, so all ideals are principal ideals. Now, $(4,7)$ is an ideal in $\mathbb{Z}$, so it must be a principal ideal, but which element is its generator?
For clarity: $$ (4,7) = \{ 4n + 7m \mid n,m \in \mathbb{Z} \}$$ $$ = \{ 0,4,7,8,11,12,14,15,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31, ... \} $$
I figured both $4$ and $7$ must be divisible by the generator of $(4,7)$, but $7$ is prime, and not a divisor of $4$. Where did I make a mistake?
EDIT: The set I showed is in fact incorrect, as pointed out. $(4,7)$ is $\mathbb{Z}$.
Hint: Remember that $m$ and $n$ can be negative...
The general result that's relevant here is Bezout's identity (Wikipedia link).