Sums of primitive roots

In my previous post, we saw that adding up all the complex nth roots of unity always yields zero (unless n=1, in which case the sum is 1). Intuitively, this is because the roots are symmetrically distributed around the unit circle, so their contributions to the sum all cancel out.

Today I want to consider the question: what happens when we add up only the primitive nth roots of unity? Recall that a primitive nth root is one which is not also an mth root for some smaller m < n. As points on the unit circle, the primitive roots correspond to the spokes which are relatively prime to n.

In some cases we clearly still get zero, again because of symmetry. Shown below are n = 4, 8, 9, and 12:

For n=1 we of course get 1 again:

For n=2 the only primitive root is -1, so the sum is clearly -1. It’s not too hard to see that the sum of primitive roots for n=3 will also be -1:

Why is that? Well, when n=3, the only root that is not a primitive root is 1, so if we subtract out 1 from the sum of all roots, we are left with the sum of the remaining, primitive roots. But we know the sum of all roots is zero, and hence the sum of the remaining primitive roots must be -1. In fact, this is not specific to n=3; the same argument applies to any prime number. When n is prime, every root is primitive except for 1 itself, so in order for the sum of all the roots to be zero, the sum of all the primitive roots must be -1.

However, this still leaves other values of n where it is not obvious what we will get as the sum of primitive roots. For example, here are n=10, 14, and 15:

Let’s look at n=10. The primitive roots have reflection symmetry across the x-axis, so their sum must lie somewhere on the x-axis (since their “up-down pulls” cancel out). Since they are leaning more in the positive direction, the sum will be bigger than zero. But how much bigger? Just thinking about the x components, we are adding together irrational numbers involving things like the cosine of \pi/5, so maybe we just get some weird irrational sum like 0.8267834852\dots? It seems plausible, but actually, we don’t: we instead get a sum of… exactly 1! And the sums for n=14 and n=15… are also exactly 1. Something strange is going on.

But you don’t have to take my word for it! Next time we’ll put together what we know about the sum of all roots and how the set of nth roots is made up of primitive roots for the divisors of n to compute sums of primitive roots.

Advertisements

About Brent

Assistant Professor of Computer Science at Hendrix College. Functional programmer, mathematician, teacher, pianist, follower of Jesus.
This entry was posted in geometry, pictures and tagged , , , , , , . Bookmark the permalink.

4 Responses to Sums of primitive roots

  1. You are asking about coefficients of cyclotomic polynomials, specifically, the coefficient of the second highest power of x in $\Phi_n(x)$. Gauss showed it’s always an integer, wikipedia said coefficients can go arbitrarily high… but the coefficient of the second highest power?

    Both Wikipedia and Wolfram Mathworld give a formula for $\Phi_n(x)$ in terms of Mobius functions, which boils down to a ratio of two products of $x^k – 1$ for various (different collections of) factors $k$ of $n$. The numerator and denominator are therefore of the form $x^p + a x^{p-1} + …$ and $x^q + b x^{q-1} + …$, with at most one of $a$ and $b$ being nonzero, and that nonzero coefficient being -1 or 1. The ratio, $\Phi_n (x)$, therefore has second highest coefficient either -1, 1 or 0.

    You could dig further into the Mobius formula to predict which sums of primitive roots will give each of the three possible values -1, 0 or 1.

  2. Pingback: Computing sums of primitive roots | The Math Less Traveled

Comments are closed.