Residue-area polynomials
Why package the residue-area profile?
For a fixed modulus $N$, the list $$ \bigl(S(N,0), S(N,1), \ldots, S(N,N-1)\bigr) $$ contains more information than the total $S(N)$ alone. The simplest way to keep that whole residue-by-residue profile visible is to package it into a polynomial.
This is not meant to create a new geometry of its own. The point of the package is more modest and more useful: certain evaluations and derivatives combine the coefficients in exact ways that would be harder to see from the raw list. In particular, the zero-class coefficient $S(N,0)$ is no longer just a formal constant term. By Chapter 5, it is the area of a completely described divisor-envelope hull, and that same chapter rewrites it as a hyperbolic baseline minus an exact arithmetic correction. The polynomial package therefore gives several algebraic ways to recover the area of one geometric object that is already understood in detail.
Before writing the formal definition, it helps to read the polynomial as a bookkeeping device. Start with the coefficient list $$\bigl(S(N,0), S(N,1), \ldots, S(N,N-1)\bigr).$$ Then place $S(N,a)$ in front of $x^a$. Nothing geometric is being discarded; the same data is simply being packed into one algebraic object.
@fig:residue-area-polynomial-package summarizes that reading. The polynomial is the middle box, and the later identities come from plugging in special values of $x$ or differentiating.

Definition and immediate evaluations
So the definition should be read very literally: $P_N(x)$ is just the residue-area list written as a polynomial, with the area of the zero class sitting in the constant term.
For the three moduli that will serve as running examples here, one has $$ P_6(x) = 2 + 9x^2 + 8x^3 + 9x^4, $$ $$ P_7(x) = 12x + 8x^2 + 15x^3 + 15x^4 + 8x^5 + 12x^6, $$ $$ P_9(x) = 9 + 27x + 12x^2 + 32x^3 + 27x^4 + 27x^5 + 32x^6 + 12x^7 + 27x^8. $$
Proof. Writing $$ P_N(x) = S(N,0) + \sum_{a=1}^{N-1} S(N,a)x^a $$ makes the constant term explicit, so $$ P_N(0) = S(N,0). $$ Also $$ P_N(1) = \sum_{a=0}^{N-1} S(N,a) = S(N). $$ □
The first identity should now be read geometrically: $P_N(0)$ is the area of the zero-class divisor hull from Chapter 5, not merely the coefficient indexed by $a=0$.
Symmetry and reflected coefficients
The basic residue symmetry from Chapter 5 is $$ S(N,a) = S(N,(-a)\bmod N). $$ For $1 \leq a \leq N-1$, this is the same as $$ S(N,a)=S(N,N-a). $$
Proof. Pair the coefficient of $x^a$ with the coefficient of $x^{N-a}$. The symmetry $$ S(N,a)=S(N,N-a) $$ turns the pair into $$ S(N,a)x^a + S(N,N-a)x^{N-a} = S(N,a)\bigl(x^a + x^{N-a}\bigr). $$ If $N$ is even, the middle residue $a=N/2$ is unpaired and contributes its own term. □
In plain language, the nonzero coefficients come in mirrored pairs: once the constant term $S(N,0)$ is set aside, the coefficient list reads the same from left and right.
The zero class as a geometric anchor
The derivative at $x=1$ gives a weighted version of the coefficient sum: larger residue labels count more heavily. The identity below shows exactly how the zero-class area corrects that weighted total.
Proof. Let $$ T := \sum_{a=1}^{N-1} a\,S(N,a). $$ The $a=0$ term vanishes automatically, so $T=P_N'(1)$. Now substitute $b=N-a$. Using the reflection symmetry on the nonzero residues, $$ T = \sum_{b=1}^{N-1} (N-b)S(N,b) = N\sum_{b=1}^{N-1} S(N,b) - \sum_{b=1}^{N-1} b\,S(N,b). $$ Hence $$ T = N\bigl(S(N)-S(N,0)\bigr) - T, $$ so $$ 2T = N\bigl(S(N)-S(N,0)\bigr). $$ Therefore $$ P_N'(1)=T=\frac{N}{2}\bigl(S(N)-S(N,0)\bigr). $$ □
This identity is one of the main reasons to introduce the polynomial viewpoint here. It shows that $S(N,0)$ is not merely one more coefficient and not merely a prime/composite signal. It is the exact correction term between the total area and the first weighted moment of the residue-area profile. Because Chapter 5 gives a full divisor-geometric description of $S(N,0)$, the derivative identity singles out a quantity whose geometry is already completely understood.
For the running examples, $$ P_7'(1) = \frac{7 \cdot 70}{2} = 245, $$ while $$ P_6'(1) = \frac{6(28-2)}{2} = 78. $$ The difference is exactly the zero-class area term.
Odd evaluation at $x=-1$ and a factorization corollary
For odd $N$, evaluating at $x=-1$ turns the polynomial into an alternating sum. The nonzero coefficients then cancel in reflected pairs, leaving only the zero-class term behind.
Proof. Pair each nonzero residue $a$ with $N-a$. When $N$ is odd, these two integers have opposite parity, so $$ (-1)^a + (-1)^{N-a} = 0. $$ Using $S(N,a)=S(N,N-a)$, every nonzero pair cancels in the alternating sum. The only surviving term is the constant term $S(N,0)$. □
For example, $$ P_9(-1) = 9 - 27 + 12 - 32 + 27 - 27 + 32 - 12 + 27 = 9 = S(9,0). $$ So in the odd composite case, the evaluation at $x=-1$ recovers the same zero-class area rather than vanishing.
Proof. The factor $x$ divides $P_N(x)$ exactly when the constant term vanishes, so by the values-at-$0$ proposition this is equivalent to $S(N,0)=0$. For odd $N$, the proposition above gives $$ P_N(-1)=S(N,0), $$ so $x+1$ divides $P_N(x)$ exactly when $S(N,0)=0$. The combined statement follows immediately. □
Proof. Combine the previous corollary with the sharp zero-class degeneracy criterion from Chapter 5. □
This is an exact and elegant algebraic consequence of the zero-class geometry, but it should be read in the right scale. It explains the two linear factors forced by the vanishing of the zero-class area. It does not yet explain the remaining factorization of $P_N(x)$ over $\mathbb{Q}$.
Brief remark on roots of unity
Because the residue label $a$ lives in the cyclic group $\mathbb{Z}/N\mathbb{Z}$, evaluations of $P_N(x)$ at roots of unity and discrete Fourier methods are natural later directions. We do not make them part of the present chapter. One possible later bridge is to compare the Fourier grouping by residue classes with an exact-product-layer decomposition of the same modular class by values $a+kN$ inside the positive window. The point of the polynomial viewpoint here, however, remains the exact structure already visible from symmetry, evaluation, the first derivative, and the distinguished zero-class coefficient.