A recent question asked for the residue modulo $101$ of $$A = \prod_{a=0}^9 \prod_{b=0}^{100} \prod_{c=0}^{100} (w^a + z^b + z^c)$$ where $w = e^{2\pi i/10}$ and $z = e^{2\pi i/101}$. I gave an answer that works as long as $A$ is known to be an integer. (To be precise: we know that $A \in \mathbb{Z}[e^{2\pi/1010}]$, and I computed the equivalence class of $A$ in $\mathbb{Z}[e^{2\pi/1010}]/(101)$, which is the same as its equivalence class in $\mathbb{Z}/101\mathbb{Z}$ if $A \in \mathbb{Z}$.)
I can't prove that $A$ is an integer, but I can prove, for example, that $\prod_{b=0}^{100} \prod_{c=0}^{100} (z^b + z^c)$ is an integer (this follows from the formula $\prod_{c=0}^{100} (x + z^c) = x^{101} + 1)$. I couldn't get from here to showing $A \in \mathbb{Z}$, but I suspect I'm overlooking some symmetry; would it be enough to argue that $A$ is an algebraic integer that is fixed by the Galois group of $\mathbb{Q}[e^{2\pi/1010}]$?
A natural generalization: Given positive integers $k_1, \ldots, k_n$, when is $$\prod_{a_1 = 0}^{k_1 - 1} \cdots \prod_{a_n=0}^{k_n-1} (e^{2\pi i a_1/k_1} + \cdots + e^{2 \pi i a_n/k_n})$$ an integer?