TITLE: How small can a sum of a few roots of unity be?
QUESTION [104 upvotes]: Let $n$ be a large natural number, and let $z_1, \ldots, z_{10}$ be (say) ten $n^{th}$ roots of unity: $z_1^n = \ldots = z_{10}^n = 1$.  Suppose that the sum $S = z_1+\ldots+z_{10}$ is non-zero.  How small can $|S|$ be?
$S$ is an algebraic integer in the cyclotomic field of order $n$, so the product of all its Galois conjugates has to be a non-zero rational integer.  Using the utterly crude estimate that the magnitude of a non-zero rational integer is at least one, this gives an exponential lower bound on $S$.  On the other hand, standard probabilistic heuristics suggest that there should be a polynomial lower bound, such as $n^{-100}$, for $|S|$.  (Certainly a volume packing argument shows that one can make $S$ as small as, say, $O(n^{-5/2})$, though it is unclear to me whether this should be close to the true bound.)  Is such a bound known?  Presumably one needs some algebraic number theoretic methods to attack this problem, but the only techniques I know of go through Galois theory and thus give exponentially poor bounds.
Of course, there is nothing special about the number $10$ here; one can phrase the question for any other fixed sum of roots, though the question degenerates when there are four or fewer roots to sum.

REPLY [19 votes]: This question grabbed my attention a couple of years ago and I've just put a paper on the arXiv with new upper bounds for $k=5$.  I began by computing lots of data, then teased out the structure of particularly well-performing configurations.  The headline is that $f(5,n) = O(n^{-4/3})$, improving to $O(n^{-7/3})$ infinitely often.
The first picture that really caught my eye was this one, which shows a large dip in the minimum length for $n \approx 10 000$ (log-log scales) when we only look at $n \equiv 11 \mod 12$.

Looking at the points in the dip led to me scribbling this page.

These small sums arise from two ideas: that $1 + \omega + \omega^2 + i + (-i) = 0$ (writing $\omega$ for the primitive third root), and that perturbations of this configuration can also be small when they are related to close rational approximations of $\sqrt 3$.
There are also places with dips corresponding to perturbations of the set of fifth roots of unity, relying on close rational approximations to the golden ratio $\phi$.  This is easier to work with than $\sqrt 3$, so most of the arguments in the paper are in that setting.  (It's easier to work in prescribed congruence classes, for example, because the convergents to $\phi$ have a very simple structure.)  I also mention perturbing other configurations which sum to zero, with no concrete improvements but greater possibilities for analysis by more sophisticated means.
My code and data aren't anywhere online right now, but that's only because I haven't decided on a good stable place to post them.  I'll happily share them with anyone who's interested.
e: The perfect is the enemy of the good, so my code and data are at least temporarily available at https://babarber.uk/583/small-sums-of-five-roots-of-unity/