= Solution
The <polar form of a complex number> and the <roots of unity> give
$$
z_1=e^{2\pi i j/3},\quad j=0,1,2,
\qquad z_2=2e^{2\pi i k/9},\quad k=0,\ldots,8,
$$
since $512=2^9$. Using the <complex conjugate> to compute the squared <complex modulus>,
$$
|z_1-z_2|^2=|z_1|^2+|z_2|^2-2\operatorname{Re}(z_1\overline{z_2})
=5-4\cos\frac{2\pi(3j-k)}9.
$$
The residue $3j-k$ runs through every class modulo $9$, already with $j=0$. The <cosine> is even, so the nine angles give five distinct values, represented by $r=0,1,2,3,4$. They are distinct because <cosine> is strictly decreasing on $[0,\pi]$ and these representative angles lie in that interval. Hence
$$
\boxed{|z_1-z_2|\in
\left\{1,\sqrt{5-4\cos\frac{2\pi}9},
\sqrt{5-4\cos\frac{4\pi}9},\sqrt7,
\sqrt{5-4\cos\frac{8\pi}9}\right\}.}
$$
Every listed value is attained by choosing $z_1=1$ and $z_2=2e^{2\pi i r/9}$.
Back to article page