Maths Olympiad Prep

Library / Harvard-MIT Mathematics Tournament /349 of 352

Harvard-MIT Mathematics Tournament

Combinatorics Difficulty 6.0 National Olympiad Prove it United States

Problem:

Let pp be a prime positive integer. Define a mod-pp recurrence of degree nn to be a sequence {ak}k≥0\{a_k\}_{k \geq 0} of numbers modulo pp satisfying a relation of the form ai+n=cn−1ai+n−1+…+c1ai+1+c0aia_{i+n} = c_{n-1} a_{i+n-1} + \ldots + c_1 a_{i+1} + c_0 a_i for all i≥0i \geq 0, where c0,c1,…,cn−1c_0, c_1, \ldots, c_{n-1} are integers and c0≢0(modp)c_0 \not\equiv 0 \pmod{p}. Compute the number of distinct linear recurrences of degree at most nn in terms of pp and nn.

Solution

Solution:

Answer: 1−np−1p+1+p2(p2n−1)(p+1)21 - n \frac{p-1}{p+1} + \frac{p^{2}(p^{2n}-1)}{(p+1)^{2}}

In the solution all polynomials are taken modulo pp. Call a polynomial nice if it is monic with nonzero constant coefficient. We can associate each recurrence relation with a polynomial: associate
cnai+n+cn−1ai+n−1+…+c1ai+1+c0ai=0 c_{n} a_{i+n} + c_{n-1} a_{i+n-1} + \ldots + c_{1} a_{i+1} + c_{0} a_{i} = 0
with
cnxn+cn−1xn−1+…+c1x+c0. c_{n} x^{n} + c_{n-1} x^{n-1} + \ldots + c_{1} x + c_{0}.
Let DiD_{i} be the set of mod-pp recurrences {ak}k≥0\{a_{k}\}_{k \geq 0} where ii is the least integer so that {ak}k≥0\{a_{k}\}_{k \geq 0} has degree ii, and let di=∣Di∣d_{i} = |D_{i}|.
Let SnS_{n} be the set of pairs ({ak}k≥0,P)\left(\{a_{k}\}_{k \geq 0}, P\right) where {ak}k≥0\{a_{k}\}_{k \geq 0} is a mod-pp recurrence, and PP is a nice polynomial associated to a recurrence relation of degree at most nn satisfied by {ak}k≥0\{a_{k}\}_{k \geq 0}. To find dnd_{n} generally, we count the number of elements in SnS_{n} in two ways.

On the one hand, for each sequence {ak}k≥0\{a_{k}\}_{k \geq 0} in DiD_{i}, there exist pn−ip^{n-i} polynomials PP such that ({ak}k≥0,P)∈S\left(\{a_{k}\}_{k \geq 0}, P\right) \in S. Indeed, {ak}k≥0\{a_{k}\}_{k \geq 0} satisfies any recurrence relation associated with a polynomial multiple of PP. When j=ij = i there is just one nice degree jj polynomial that is a multiple of PP, PP itself. For j>ij > i, there are (p−1)pj−i−1(p-1) p^{j-i-1} nice polynomials of degree jj that are multiples of PP, namely QPQ P where QQ is a nice polynomial of degree j−ij-i. (There are pp choices for the coefficients of x,…,xj−i−1x, \ldots, x^{j-i-1} and p−1p-1 choices for the constant term.) So the number of nice polynomial multiples of degree at most nn is
1+∑j=i+1n(p−1)pj−i−1=1+(p−1)(pn−i−1p−1)=pn−i 1 + \sum_{j=i+1}^{n} (p-1) p^{j-i-1} = 1 + (p-1)\left(\frac{p^{n-i}-1}{p-1}\right) = p^{n-i}
Hence
∣Sn∣=∑i=0ndipn−i |S_{n}| = \sum_{i=0}^{n} d_{i} p^{n-i}

On the other hand, given a monic polynomial PP of degree ii, there are pip^{i} recurrences {ak}k≥0\{a_{k}\}_{k \geq 0} such that ({ak}k≥0,P)∈S\left(\{a_{k}\}_{k \geq 0}, P\right) \in S, since a0,…,ai−1a_{0}, \ldots, a_{i-1} can be chosen arbitrarily and the rest of the terms are determined. Since there are (p−1)pi−1(p-1) p^{i-1} nice polynomials of degree i≠0i \neq 0 (and 1 nice polynomial for i=0i=0), summing over ii gives
∣Sn∣=1+∑i=1n(p−1)p2i−1 |S_{n}| = 1 + \sum_{i=1}^{n} (p-1) p^{2i-1}

Now clearly d0=1d_{0} = 1. Setting (1) and (2) equal for nn and n+1n+1 give
∑i=0n+1dipn+1−i=1+(p−1)∑i=1n+1p2i−1∑i=0ndipn−i=1+(p−1)∑i=1np2i−1⟹∑i=0ndipn+1−i=p+(p−1)∑i=1np2i \begin{aligned} \sum_{i=0}^{n+1} d_{i} p^{n+1-i} & = 1 + (p-1) \sum_{i=1}^{n+1} p^{2i-1} \\ \sum_{i=0}^{n} d_{i} p^{n-i} & = 1 + (p-1) \sum_{i=1}^{n} p^{2i-1} \\ \Longrightarrow \sum_{i=0}^{n} d_{i} p^{n+1-i} & = p + (p-1) \sum_{i=1}^{n} p^{2i} \end{aligned}
Subtracting (4) from (3) yields:
dn+1=1−p+(p−1)∑i=12n+1(−1)i+1pi=(p−1)∑i=02n+1(−1)i+1pi=(p−1)2∑i=0np2m=(p−1)2(p2n+2−1p2−1)=(p−1)(p2n+2−1)p+1 \begin{aligned} d_{n+1} & = 1 - p + (p-1) \sum_{i=1}^{2n+1} (-1)^{i+1} p^{i} \\ & = (p-1) \sum_{i=0}^{2n+1} (-1)^{i+1} p^{i} \\ & = (p-1)^{2} \sum_{i=0}^{n} p^{2m} \\ & = (p-1)^{2}\left(\frac{p^{2n+2}-1}{p^{2}-1}\right) \\ & = \frac{(p-1)(p^{2n+2}-1)}{p+1} \end{aligned}
Thus the answer is
∑i=0ndi=1+p−1p+1∑i=1n(p2i−1)=1+p−1p+1(−n+p2⋅p2n−1p2−1)=1−np−1p+1+p2(p2n−1)(p+1)2 \begin{aligned} \sum_{i=0}^{n} d_{i} & = 1 + \frac{p-1}{p+1} \sum_{i=1}^{n} (p^{2i} - 1) \\ & = 1 + \frac{p-1}{p+1}(-n + p^{2} \cdot \frac{p^{2n}-1}{p^{2}-1}) \\ & = 1 - n \frac{p-1}{p+1} + \frac{p^{2}(p^{2n}-1)}{(p+1)^{2}} \end{aligned}

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.