Every third coefficient
Worth reading first: The polygon an equation forces · A polynomial that counts.
The twelfth row of Pascal’s triangle is 1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1, and its entries add to . Take every third entry, starting from the first: . The entries one place along add to , and the entries two places along to .
Three sums, each within one of a third of 4096, and the first class is the one that gets the extra unit. Nothing in the row suggests either fact. Both are forced, and the forcing happens in the complex plane, at the three cube roots of one.
Making the unwanted terms cancel
A polynomial holds its coefficients in a form that is easy to add all at once: is their total. Adding only some of them needs a value of that treats different positions differently, and the cube roots of one are the cheapest such values.
Let be the root a third of a turn round the circle, so that and the three roots add to nothing: . Evaluate at and each power of becomes a power of , which depends only on the remainder of the exponent: , and all become 1, while and both become .
Now add the three values . A coefficient whose position is a multiple of 3 is multiplied by 1 each time, so it appears three times. A coefficient at a position is multiplied in turn by , and , which add to nothing, so it disappears. One at a position is multiplied by , and , and disappears too. What is left is
The other two classes need one adjustment. To keep the positions instead, turn each value back before adding it — multiply by and by — so that the wanted coefficients are brought round to 1 and the rest are left spread evenly round the circle, cancelling.
The recipe works with any number in place of 3. Average over the -th roots of one, and exactly the coefficients at positions leaving remainder survive. It is usually called the roots-of-unity filter, and it is nothing more than the vanishing sum doing a job.
Two arrows of length one
For a row of Pascal’s triangle the polynomial is , and evaluating it at the three cube roots needs only three numbers: , and . Those are the three arrows in the figure.
The first is plain, and for row 12 it contributes . The second is where the answer is decided. The root is , so , a number of length exactly one sitting a sixth of a turn round from 1. Multiplying by it is a pure turn of sixty degrees with no stretch, so its twelfth power is twelve sixths of a turn, which is two whole turns: . The third arrow is the reflection of the second, and its twelfth power is also 1.
So , and a third of that is 1366. For the class one place along, the two small values are turned back by and before they are added, which makes them and ; those add to , and the total is . The third class comes out the same.
The long arrow supplies the third and the two short arrows supply the rounding. That is why every total sits so close to . The correction terms are powers of numbers on the unit circle, so however large becomes they never grow. Written out for any row, the total of the class is
and a cosine lies between and , so no class is ever more than two-thirds of a unit away from an exact third.
A pattern of six rows
The cosine formula predicts a short cycle and the table shows it. The gap between three times a class total and is , which takes the values , , , , and as runs through six consecutive rows. At row 0 the first class holds the single entry 1 and the others hold nothing, so the gaps are , and . At row 12 they are , and again, which is where 1366, 1365 and 1365 came from.
The period is six because is itself a root of unity — a sixth root, since it lies a sixth of a turn round the circle. Its powers run round a hexagon and return to their start every six steps, and they carry the correction terms with them. That is a small coincidence worth pausing on. The cube roots of one were brought in to pick out every third coefficient, and the number that decides the rounding turns out to be a sixth root of one that nobody chose.
Two consequences can be read straight off the table. The three classes never differ from one another by more than one, so the entries of any row taken by position three apart carry almost exactly a third of its total. And which class gets the extra unit depends only on the row’s remainder on division by six, so row 18 behaves like row 12, row 6 and row 0.
None of this is visible in the recurrence that builds the triangle, which adds neighbouring entries and knows nothing about positions three apart. The regularity lives in a different description of the row — its values at three points of the circle — and it is invisible from inside the one everybody draws.
When the other arrows are longer
The same recipe with uses the four fourth roots of one, , , and , and needs the values , then , then , then .
One arrow has vanished and two have grown. The vanished one is harmless: it contributes nothing to any class in any row after the first. The two that have grown are the problem. The number has length , so its tenth power has length , and at that size it is no longer a rounding. For row 10 the class of positions comes out at and the class of positions at , while the other two sit exactly on .
The imbalance grows without limit, and yet as a share of the row it still disappears. The gaps grow like while the row’s total grows like , so the four classes approach a quarter each at the rate , about 0.707 per row.
In general the arrows for the -th roots are the numbers , of length , and the longest after the first belongs to , with length . So the classes of a row even out at the rate : in a single step when , where that rate is exactly a half and the gaps never grow at all; slowly for , where it is 0.966 per row. How evenly Pascal’s triangle shares itself among remainders is decided by a single cosine.
The same rate, reached by a walk
That rate has been met before, somewhere that looks nothing like Pascal’s triangle.
Divide a row by and it becomes the distribution of the number of heads in tosses of a fair coin. Its class totals mod are then the chances that the number of heads leaves each remainder on division by . And the remainder of the number of heads is a walk round a ring of positions, in which each toss either stays put or moves one place on, each with probability one half. How evenly the classes are filled after tosses is therefore the question of how long a chain takes to forget where it started.
That essay’s answer is that the distance to the settled state shrinks at a rate set by the second-largest eigenvalue of the chain. For a walk round a ring the eigenvalues can be written down, because a step is an average of staying and moving, and moving is a rotation. They are the numbers — the arrows in the figures, halved. The largest is 1, from , and the next in length is .
The rounding in Pascal’s triangle and the mixing rate of a walk on a ring are the same number, found from two different ends. The walk on a ring of three halves its distance from even with every toss. The walk on a ring of twelve takes about twenty tosses to halve it, since multiplied by itself twenty times is about a half.
Nothing about coins went into the first calculation, and nothing about binomial coefficients into the second. The meeting point is the arrows. They are the characters of the rotation group — the functions that turn a step round the ring into a turn of the circle — and, as Fourier’s coefficients do for a periodic curve, they split both problems into independent pieces at once.
Dice that divide evenly
The filter needs only a polynomial, and any counting problem that combines independent choices supplies one. A single die is , with the exponent recording the number rolled, and dice are its -th power, because multiplying polynomials adds exponents and pairs every roll of one die with every roll of the others.
The number of throws whose total is divisible by is the average of the die’s -th power over the -th roots. At the root 1 the die is worth 6, which gives the expected share . At every other root it is worth , and whether that sum is zero decides everything.
For a cube root the six powers go twice round a triangle and add to nothing, so every correction vanishes and the total of any number of dice is divisible by 3 exactly a third of the time — not approximately, and not only in the limit. The same holds for 2 and for 6, whose roots also close up in six steps.
For a fourth root the six powers run once and a half round a square and stop at , of length , so the share is wrong and the error grows with the number of dice, as it did mod 4 in the triangle. For a fifth root the six powers wrap round a pentagon and one step beyond, and add to itself, of length one. For a seventh root they add to . Those errors stay bounded, and the filter turns them into exact formulas with a small correction: the number of throws of dice whose total is divisible by 7 is , which is 30 for three dice and 186 for four.
Subsets, and a count that belongs to necklaces
The last use is the strangest, because the answer it produces already has a name somewhere else.
Take the numbers and ask how many of the subsets have a total divisible by . The polynomial is , each factor either leaving its number out or putting it in, and the filter averages it over the -th roots.
At a root of order , the powers run times through all of the -th roots of one. The product of over those roots comes from setting in , and it is 2 when is odd and 0 when is even. So a root of even order contributes nothing to the average, and a root of odd order contributes .
The count is therefore , taken over the odd divisors of , where counts the roots of order exactly . Taken over all the divisors, the same sum is the number of necklaces of beads in two colours counted up to rotation — the count that proves Fermat’s little theorem. The two agree precisely when has no even divisors, which is when is odd.
The coincidence has a reason. Counting necklaces means averaging over the rotations of a ring, and a rotation of order leaves exactly colourings unchanged. Averaging over the -th roots of one is averaging over the same rotations, written as numbers, and the subset problem simply gives every rotation of even order a weight of nothing. At a prime both counts are , which at is twenty.
What the average cannot see
The filter is exact and it is narrow, and both halves are worth stating.
It sorts by position and by nothing else. It picks out the coefficients whose index leaves a given remainder, which is a question about the exponent of . Asking which binomial coefficients are themselves divisible by 3 is a question about their values, and it has a different answer, read off the digits of in base 3.
The values at the roots are complex numbers, and the answers are whole numbers. The figures evaluate and the dice and subset products as pairs of floating-point numbers and require the average to land within a millionth of the whole-number total found by adding. At row 16 the largest value involved is 65536 and the arithmetic has digits to spare; at row 60 it would not, and the computation would need exact arithmetic with the roots themselves. The whole-number totals are never in doubt, because they come from adding, but the route through the roots is a numerical agreement at the sizes drawn and a theorem everywhere else.
The pictures stop at small rows and small moduli. Rows are drawn to thirteen and moduli to seven. A table of fourteen rows shows two cycles of a pattern of six and cannot show that the pattern never breaks; the cosine formula shows that, and so does the fact that is a root of one, which no table can display.
The question it leaves: which points on the circle come home
Every calculation above rested on points of the unit circle whose powers return: after three steps, after six, after four. The rounding stayed bounded mod 3 because the short arrows were such points, and grew mod 4 because the short arrows had left the circle altogether.
That invites a converse. A point lying exactly on the unit circle has powers that never grow and never shrink, just as does. Does lying on the circle make it a root of one? If it did, a bounded correction and a periodic one would be the same thing. They are not, and the point — on the circle, and a turn by an angle that is no fraction of a whole turn — is where the difference first shows. What separates the two kinds of point is a condition on the numbers they are tied to by their polynomials, and it is Kronecker’s.
There is also an older direction: which sums of roots of one vanish. The filter used the simplest vanishing sum there is, all roots taken together, and there are others — the three cube roots sit among the sixth roots and add to nothing on their own. How many terms a vanishing sum of -th roots can have, counting repetitions, was settled only in 2000 by Lam and Leung: exactly the numbers that can be written as sums of primes dividing .
Evaluating where the terms cancel
A polynomial’s coefficients can be pulled apart without computing them one at a time, by evaluating the polynomial at points chosen so that the unwanted ones cancel. The roots of one are the points that do this for classes of exponents, because their powers depend only on a remainder and their sums vanish.
What makes the method more than a trick is what is left over once the cancelling is done. For the triangle it is powers of ; for dice, powers of ; for subsets, products of . In every case the length of the leftover is the whole story. A leftover of zero gives an exact share, a leftover of length one gives a bounded error, and a leftover longer than one gives an error that grows and still vanishes as a fraction of the whole.
When a count is shared almost evenly, find the points at which the sharing is decided and measure how long the leftovers are there. The size of the unevenness, and the rate at which it disappears, are both lengths in the complex plane.
What links here
Computed from the collection, not written here: the essays that point at this one.
Reads more easily once this is understood
Essays that name this one as worth reading first.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A remainder read two digits at a time — both name binomial coefficient, cyclic group, modular arithmetic
- Every element is a power of one of them — both name cyclic group, modular arithmetic, totient
- The blocks a subgroup cuts out — both name cyclic group, group action, modular arithmetic
- The equation a sequence satisfies — both name binomial coefficient, convolution, generating function
- Colourings nobody can tell apart — both name cyclic group, group action
- Counting the paths that go wrong — both name binomial coefficient, random walk
Named objects
A dashed tag is an object no other essay names yet.
Binomial coefficientConvolutionCyclic groupGenerating functionGroup actionModular arithmeticOrthogonalityRandom walkRoots of unityTotient