Coefficients of Gaussian Polynomials Modulo $N$

The $q$-analogue of the binomial coefficient, known as a $q$-binomial coefficient, is typically denoted $\left[{n \atop k}\right]_q$. These polynomials are important combinatorial objects, often appearing in generating functions related to permutations and in representation theory. Stanley conjectured that the function $f_{k,R}(n) = \#\left\{i : [q^{i}] \left[{n \atop k}\right]_q \equiv R \pmod{N}\right\}$ is quasipolynomial for $N=2$. We generalize, showing that this is in fact true for any integer $N\in \mathbb{N}$ and determine a quasi-period $\pi'_N(k)$ derived from the minimal period $\pi_N(k)$ of partitions with at most $k$ parts modulo $N$.


Introduction
The q-analogue of the binomial coefficient is typically denoted n k q and is defined by the rational expression . These are polynomials with degree k(n − k). These polynomials appear in combinatorics and have connections to the theory of symmetric polynomials as well as representation theory. In particular, an important characterization is that they enumerate Grassmanian Gr(k, F n q ): Theorem 1.1 (Stanley). The number of k-dimensional subspaces of F n q is n k q . This fact reveals that n k q is a polynomial. To see why, note that if a rational function f , given by f (q) = P (q)/Q(q) where P, Q ∈ Z[q], is integral for infinitely many q ∈ R (here, at prime powers q where F q exists) then it is a polynomial. Recent works such as [3] or [7] have sparked interest in these objects and their coefficients.
In this paper, we investigate the behavior of these coefficients modulo some positive integer N ∈ N. One motivation for this is the classical Lucas' theorem: Theorem 1.2 (Lucas' Theorem). For p prime, let n, k ∈ N have base p expansions n = i≥0 n i p i , k = i≥0 k i p i . Then n k ≡ i≥0 n i k i (mod p).
By fixing k, the values of n k (mod p) can be shown to form a repeating sequence related to the base p expansion of k. This extends to modulo N , as seen by the following corollary from [1]: . Let the prime factorization of N be given by p e i i for primes p i . Then n k is purely periodic modulo N , with period P = p e i +b−1 The q-binomial coefficients are an example of a "q-analogue", in the sense that lim q→1 n k q = n k . As a result, it is reasonable to expect similar structured behavior modulo p or even with general composites in the coefficients of n k q , since this shows n k = lim q→1 n k q = i≥0 [q i ] n k q . Here, [q i ]f (q) denotes the coefficient of q i in f .
We prove and generalize Conjecture 1.8, that the 'residue counting' function for these coefficients is a quasipolynomial. From [6], we have the following definition of a quasipolynomial function:  (Stanley). A function f : N → R is quasipolynomial with degree d if where c i (n) is a periodic function with integer period Q that is not identically 0. We call Q a quasi-period of f . Note that Q is not unique, since kQ is a quasiperiod for k ∈ N.
Equivalently, we can say f (n) = P i (n) for n ≡ i (mod Q) where P i ∈ Z[x]. In order to state the main result (Theorem 1.9), we make the following definitions. Definition 1.5. For a natural number N that we call the modulus, R ∈ Z/N Z, and k ∈ N, we define This function counts the number of coefficients congruent to R modulo N .
Definition 1.6. Define π N (k) as the minimal period of p ≤k (n) modulo N , where p ≤k (n) denotes the number of partitions with at most k parts.
Remark 1. From [5], we see that p ≤k is also an example of a quasipolynomial function.
Definition 1.7. Define π N (k) as follows: Stanley originally conjectured the following: The following theorem, which generalizes Conjecture 1.8, is the main result of this paper. This is shown in Sections 3 and 4. Theorem 1.9. For a modulus N , the function f k,R (n) is quasipolynomial, with a quasi-period π N (k) and degree one.
The idea will be to formulate an equivalent restatement of Theorem 4.3, which makes a more direct statement about the structure of the coefficients modulo N . In Section 5, we investigate the structure of the generating function

Coefficients of low degree terms in n k q
We first try to understand the behavior of the coefficient of q i in n k q for small i. Lemma 2.1. Let n 0 , k ∈ N be arbitrary, and n ≥ n 0 + k. Then for 0 ≤ i < n 0 , we have [q i ] n k q = p ≤k (i). Proof. Fix k, and consider what happens as n 0 increases. We want to show that the first n 0 coefficients of n k q are constant when n − k ≥ n 0 . Use the well-known identity from ( where p(j, k, i) denotes the number of partitions λ i with at most k parts and maximal part ≤ j. Now if i < j this last condition can be dropped, leaving p(j, k, i) = p ≤k (i). Then letting j + k = n, if n − k = j ≥ n 0 then the first n 0 coefficients are constant for all such n, and are equal to p ≤k (i) for each i. 2 λ → λ Figure 1. The complement map λ → λ on a 4x3 box, where λ = (3, 2) and λ = (4, 2, 1).

Remark 2.
A similar result is true for the last n 0 coefficients. For λ a partition with a Young diagram fitting in a j × k box, let λ be its complement as shown in Figure 1. We rotate this to make it a Young diagram. This establishes the symmetry of the q-binomial coefficients, and explains why a similar result holds.
This warrants an investigation of the function p ≤k (i) modulo N . The following theorem from [4] shows that it is purely periodic, and characterizes the minimal period for prime powers. By the Chinese Remainder Theorem, understanding the behavior of p ≤k (i) modulo prime powers is sufficient to understand its behavior modulo N . For a more detailed discussion, see [2]. Lemma 2.1 then shows that for n 0 sufficiently large, the first n 0 coefficients of n k q for n − k ≥ n 0 will follow a repeating pattern of period π p e (k) = p bp(  Next, we study S for prime powers p e as the modulus. The generating function of p ≤k (n) is given by . We can then see Taking logs, the result follows.
This can be viewed as an analogue of the finite difference operator (∆, as in [6] §1.9) acting on formal power series.
This demonstrates a key aspect of the ∆ Q operator: the lowest q monomial terms remain unchanged, while the rest of the sequence can be viewed as a union of Q subsequences with the traditional finite difference operator applied.
The main idea behind this result is to exploit the form of the generating function P ≤k (q). We can re-write it as follows, letting Q := π p e (k): where we can obtain (2), note that f (d) accounts for every factor in the denominator, and is bounded below by 0. This follows from Lemma 2.4 and the fact that each cyclotomic factor of the denominator can appear at most k times (at most once for each factor (1 − q i )). Thus we conclude that γ(q) ∈ Z[q] and that deg γ(q) = kQ − k+1 2 . Using ∆ Q as in Definition 2.5, we obtain ∆ k Q P ≤k (q) = γ(q). Using the fact that P ≤k (q) can be written as P ≤k (q) ≡ γ 0 (q) 1−q Q (mod p e ) for some unique γ 0 (q) with deg γ 0 < Q by Theorem 2.2, we can see that ∆ Q P ≤k (q) = γ 0 (q). It follows from this that using the formula for ∆ k f (n) from [6] in §1.9. Thus, for r ∈ Z/QZ we have Knowing that deg γ = kQ− k+1 2 , there must be k+1 2 −1 zeroes at the end of S. Furthermore, the polynomial γ(q) can be shown to be symmetric using (2) and the symmetry of the cyclotomic polynomials (this is only true for Φ d when d > 1, but d = 1 is not an issue as f (1) = 0). Referring 4 to Figure 3, this shows the symmetry of S when the trailing zeroes are ignored: by the symmetry of γ(q), the elements with label i in Figure 3 are equal. These are also identical instances of S without the trailing zeroes up to sign, so s 0 , . . . s |S|−( k+1 2 ) is symmetric or "anti-symmetric" about its center. Precisely, this says that The coefficients are ordered from left to right by increasing associated powers of q. We define n = Q − k+1 2 , so that the white numbers 1, 2, . . . , n enumerate coefficients in the black sections.
These ideas can be generalized using the Chinese remainder theorem.
Lemma 2.7. Partitions with at most k parts are purely periodic modulo N for all N ∈ N, with period Corollary 2.8. Theorem 2.6 also holds for S for the general modulus N .
Proof. Use Chinese remainder theorem, and note that Theorem 2.6 is preserved when combining congruences modulo different prime powers. Theorem 2.9. Let k ≥ 0 and N be odd. If k is odd and gcd π N (k+1) π N (k) , N > 1, then we have Otherwise we have the stronger result i∈Z/π N (k)Z p ≤k (i) ≡ 0 (mod N ).
Proof. First, we prove this for when k is even. We have two cases. First, suppose This means there exists a 'central' element that is self-inverse 1 in S by Corollary 2.8. Since N is odd it is 0 mod N . Using Corollary 2.8 we pair all other terms in i∈Z/π N (k)Z p ≤k (i) in zero-sum pairs. Otherwise, There is no central entry, and pairing via Corollary 2.8 suffices to show i∈Z/π N (k)Z p ≤k (i) ≡ 0 (mod N ).

Decomposition of n k q
In this section and the next, we exploit the results from Section 2 regarding the periodicity of S and the structure of S (as described by Theorem 2.6) in order to prove Theorem 1.7.
Remark 3. The change of variables n → n−i π N (k) is used to simplify proofs.
The aim is now to show that the functions L (i) k,R are linear, from which it follows by definition that f k,R is quasipolynomial. To do this, we will use the following general strategy: • Divide the coefficients of n+k k q into different sections with periodic behavior.
• Using the periodicity of the first n coefficients (by Lemma 2.7), inductively show that these sections are also periodic using a friendly partition decomposition (Lemma 4.2). • Use this last fact to show that n → n + π N (k) changes f k,R (n + k) a constant amount depending only on r. • Conclude f k,R is quasipolynomial, since the previous point shows L (i) k,R are linear. We begin with the division of coefficients in n k q into different sections. is the sequence of coefficients denoted by S i with jth term given by where j ∈ Z/nZ. As a special case, S 0 is just a concatenation of copies of S.
Recall the aforementioned identity where p(n, k, i) denotes the number of partitions λ i, with at most k parts and maximal part ≤ n. This definition allows us to loosely characterize a section by saying terms in the sequence contain the number of partitions which fit in a n × k box of size |λ| = l for l such that there exists a partition of λ l covering i complete rows but no partition covering i + 1 rows. 6 Definition 3.3. Let X = (x 0 , . . . , x |X|−1 ) and Y = (y 0 , . . . , y |Y |−1 ) be finite sequences. The concatenation operator ⊕ is defined as X ⊕ Y = (x 0 , x 1 , . . . x |X|−1 , y 0 , y 1 , . . . y |Y |−1 ).
We then make the following decomposition of S i that proves useful: i are π N (k)-length subsequences and R i is the remainder after these l = n π N (k) consecutive subsequences are removed from S i . Informally, if we regard n+k k q as a sequence ordered by the associated exponents of q, we can relate X = i∈[k] S i−1 ⊕(1) to its corresponding q-binomial coefficient. Here, (1) is just a sequence only containing 1. We can index X starting at 0, obtaining n + k k The net result of this decomposition is illustrated in Figure 4.

Proving f k,R is quasipolynomial
Using the definitions from Section 3, we investigate the structure of each individual section. . Let P bad i,m be the set containing all pairs of partitions (λ, µ) such that • |λ| + |µ| = mn + j.
• λ has at most k parts each at most n, of which i are equal to n.
• µ has exactly i parts. #P bad i,m (j).
Proof. Let S be the set of partitions counted by p (m) ≤k (j) and S be defined similarly for p ≤k (mn+ j). It is clear that S ⊆ S , so we wish to show that i∈[m] #P bad i,m (j) enumerates all of the additional partitions that leave the n × k box. Consider Figure 5 below. Figure 5 depicts a pair (λ, µ) ∈ P bad i,m (j). Here, λ is represented by the shaded boxes inside the n × k box. The darker boxes depict the i parts of λ that are exactly n, while the lighter gray boxes below depict the part of λ that can vary. Outside of the n × k boxes is µ, with precisely i parts. As labelled in the diagram, it is easy to see that λ are enumerated by p  enumerated by p =i . Construct a partition Π = λ + µ via part-wise addition. This is counted in S by p ≤k but not in S since it must leave the n × k box. Thus, sending (λ, µ) ∈ i∈[m] P bad i,m (j) to Π = λ + µ is a map φ from i∈[m] P bad i,m (j) to |S \ S|. We claim φ is a bijection. It is not too difficult to see that φ is an injection: if λ + µ = λ + µ then µ and µ have the same number of parts and from this it is evident µ = µ , λ = λ . Now we show φ is a surjection. Take a "bad" partition Π = {π 1 , . . . , π k } with |Π| = mn + j leaving the box. Such a partition must leave the box for the first i rows for some i ∈ [m] (we cannot have i > m, since |Π| = mn + j ≤ (m + 1)n). Setting µ = {π α − n : π α > n} and λ = {π α : π α ≤ n} ∪ {n : π α > n}, we construct a pair (λ, µ). Both λ, µ satisfy the first two conditions of Definition 4.1 due to the construction. The first condition |λ| + |µ| = mn + j is also satisfied, as |λ| + |µ| = πα>n (π α − n) + n + πα≤n π α = |Π| = mn + j.
Thus (λ, µ) ∈ P bad i,m (j), and λ + µ = Π. Thus, we have a bijection φ from i∈[m] P bad i,m (j) to |S \ S|, and it follows that The following is a restatement of Theorem 1.9 and is the main result. In §2, we already showed that S 0 has the aforementioned property for all k by considering partitions with at most k parts. One can also show that B 1 i = B 2 i = . . . = B l i holds when k = 2 8 by explicit computation of p ≤2 (j) = j 2 + 1. This establishes the base cases m = * , k = 2 and m = 0, k = * .
We show the claim holds for S m assuming it holds for S m−1 and all smaller k. Using Lemma 4.2, we have for n ∈ Z/(Ql + r)Z, where C i,m (j) = |λ| + |µ| for (λ, µ) ∈ P bad i,m (j) (or more explicitly C i,m (j) = (m − i)(Ql + r) + j) and , ≥ 0. The functions p =i and p (m−i) ≤k−i count µ and λ in P bad i,m respectively. Note that an explicit bijection being given by taking λ n counted by p =i and decreasing each part by one. Thus, we see p =i has period Q as π N (i)|π N (k)|Q. By inductive hypothesis, p (m−i) ≤k−i also has period Q. Thus all functions in the above sum have period Q modulo N . We claim that the map j → j +Q leaves p Since p ≤k has period π N (k) | π N (k), the function p ≤k will vanish in the difference. So it suffices to show that #P bad i,m (j + Q) − #P bad i,m (j) ≡ 0 (mod N ). The expansion in (3) combined with the fact that C i,m (j + Q) − C i,m (j) = Q and that the functions in the expansion have period dividing Q implies that Here, , ∈ Z/QZ. It follows immediately from the definition of π N (k) that π N (k)/π N (k−1) ∈ N Z. But note that p (m−i) ≤k−i and p =i have periods dividing π N (k − 1) as it is always true that 1 ≤ i ≤ k −1 for each sum, and hence residues modulo N are repeated some multiple of N times in the sum. Thus p (m) ≤k (j) is Q-periodic since the sum is 0 modulo N , and by strong induction the same is true for each S m . This completes the induction.
Then l → l + 1 simply adds on another identical period in each S m . Hence, we may write where the B i are identical modulo N . For short, denote this S i = B ⊕l i ⊕ R i . More importantly, this indicates that f k,R (Q(l + 1) + r) − f k,R (Ql + r) is a constant depending on r. Thus, we can write which is precisely what we wanted.
The decomposition used in the Theorem 4.3 also allows us to prove the following observation about a special case of p Proof. This is given for m = 0 by Corollary 2.8, so let m > 0. Similarly, k = 2 is trivial. We proceed by strong induction on k, m. By Lemma 4.2, for j ∈ Z/π N (k)lZ we have #P bad i,m (j) (mod N ).
Noting that a 2 < b 2 when a < b we see that for j ∈ [π N (k) − k+1−m 2 + 1, π N (k) − 1] that p ≤k (j) ≡ 0 (mod N ) by Corollary 2.8. Therefore, for such j we have the simplified form p . We wish to show that i∈[m] #P bad i,m (j) ≡ 0 (mod N ) for such j. To do this, we use the expansion of #P bad i,m (j) from the main theorem and exploit that #P bad i,m (j + π N (k)) ≡ #P bad i,m (j) (mod N ) to obtain ≤k−i are 0 by inductive hypothesis. All added terms in the summation will have , lie in the interval [j, π N (k) − 1] and our specifically chosen j makes it so that each new term added must then be 0 mod N . The final sum is the same as the one considered in the main theorem, which was shown to be 0 modulo N . The result from the previous section allows for the generating function for f k,R to be explicitly calculated.
Theorem 5.1. For a modulus N ∈ N, we have k,R has constant term b i and slope m i and Q = π N (k).
Proof. For simplicity, let L i = L (i) k,R , and Q = π N (k) as above. Then we let Fortunately, each term is simple to find. We have i∈Z/QZ which proves the theorem.
Letting Q = π N (k − 1), it turns out that one can often rewrite this as This stems from the fact that the slopes of the functions L (i) k,R often have a smaller period (in i, where k, R are fixed) than the actual quasiperiod itself, namely Q . This is formalized by Theorem 5.2, and an example is given in Figure 6. Notice that the slopes have a period that is half of the actual minimal quasiperiod (in this case, given by the function π 5 ) and π 5 (4)/π 5 (3) = 60/30 = 2, as claimed.
by Theorem 2.9 or Corollary 2.10 and let R be arbitrary. Then the slope of L (i) k,R is equal to that of L (i ) k,R where i ≡ i + π N (k − 1) (mod π N (k)). Proof. In order to prove the theorem, we actually make a deeper claim. Consider the q-binomial coefficients n+k k q , n+k k q where n = n + π N (k − 1) and decompose the coefficients into S i and S i respectively. Then when we make the decompositions S i = B ⊕l i ⊕ R i and S i = B ⊕l i ⊕ R i , we want to show that B i is a cyclic shift of B i . From Lemma 4.2, we have where C i,m (j) = (m − i)n + j. Now we take n → n = n + π N (k − 1) and obtain a function p (m) ≤k (j) for S 1 . If we take j → j = j + mπ N (k − 1), we claim that This is equivalent to B i being a cyclic shift of B i . Using the Lemma 4.2 again, we see this is equivalent to #P bad i,m (j) (mod N ).
The remaining terms will vanish since π N (k − 1)/π N (k − 2) ∈ N Z. This is easy to show by simply counting the number of times terms are repeated and noting that they are all repeated some multiple of N using this fact. Precisely, using the decomposition in the main theorem the remaining terms can be written as a triple sum ≤k−1−i (C i,m−1 ( ) − )p =i ( ) has period dividing π N (k − 2). Fixing i, we can restrict ourselves to looking at the inner sums over and and note that C i,m ( ) is of the form K + for some constant K. The value of K is irrelevant since π N (k − 1)/π N (k − 2) ∈ N Zthis means the sum as a whole is unchanged modulo N if the innermost sum is replaced with ≤ f i ( ). In this equivalent form modulo N , each value of f i over its period π N (k − 2) is repeated π N (k−1)/π N (k−2)+1 2 times, and since N is odd and the quotient π N (k − 1)/π N (k − 2) ∈ N Z each inner sum vanishes modulo N so we can ignore all of these terms and focus on ∈Z/π N (k−1)Z p ≤k−1 ( ). This must go to zero modulo N due to the restrictions on the pair (k, N ), so we are done.
Thus, p

Asymptotics for the quasi-period
Given the complex nature of the definition for π N (k) it is worth investigating asympototics to understand how quickly f k,R (n) and its generating function grow in complexity.
First we investigate asymptotics for π p (k) for each prime p. We have the expansion