$a_{n+3}=5^n \cdot a_{n+2}+n^2 \cdot a_{n+1}+11 a_n$. Show that infinitely many $a_n$ are divisible by $2023$

179 Views Asked by At

Let $\{a_n \}$ be a sequence defined as follows:

$$ \begin{gathered} a_0=0 ; a_1=1 ; a_2=2 \text { and } \\ a_{n+3}=5^n \cdot a_{n+2}+n^2 \cdot a_{n+1}+11 a_n \text { for } n \geq 0 . \end{gathered} $$ Prove that there exist infinitely many $n \in \mathbb{N}$ such that $2023 \mid a_n$.

My ideas:

I had an idea to find a pattern between the indexes, but the numbers get much larger, making it difficult. I also attempted to use the Chinese Reminder Theorem to find an infinite number of indexes that satisfy both $7 \mid a_n$ and $17^2 \mid a_n$. However, this approach is equivalent to proving the question for $p=7$ and $17^2$ instead of $2023$, which is still very challenging. I was hoping someone could suggest a good starting point for these kinds of questions.

1

There are 1 best solutions below

0
On

We are only required to find values of $n$ such that $2023$ divides $a_n$. It is therefore sufficient to analyze the given recurrence modulo $2023$. With this in mind, we look at the new recurrence $$ a_{n+3} = 5^na_{n+2} + n^2a_{n+1} + 11 a_n\pmod{2023}. $$ and only need to prove that there exist infinitely many values of $n$ such that $a_n = 0$. Note that $a_i = i$ for $i=0,1,2$.


Imagine an easier question, where the coefficients $5^n$ and $n^2$ didn't depend upon $n$ but were instead constant. Say, maybe, $a_{n+3} = 2a_{n+2} + 7a_{n+1}-12a_n \pmod{2023}$ was the recurrence. Then, what you'll notice is that we can write the following matrix inequality modulo $2023$ : $$ \begin{bmatrix} a_{n+3}\\a_{n+2}\\a_{n+1} \end{bmatrix} = \begin{bmatrix} 2&7&-12\\1 &0&0 \\ 0&1&0 \end{bmatrix} \begin{bmatrix} a_{n+2}\\a_{n+1}\\a_{n} \end{bmatrix} $$ Write $$b_n = \begin{bmatrix} a_{n+2}\\a_{n+1}\\a_{n} \end{bmatrix}, T = \begin{bmatrix} 2&7&-12\\1 &0&0 \\ 0&1&0 \end{bmatrix} $$ Then, $b_{n+1} = Tb_n \pmod{2023}$ (where we take each entry modulo $2023$). By iteration, $b_{n+1} = Tb_n=\ldots = T^{n+1}b_0$. We will use the second idea of Greg Martin demonstrated in this answer.

Note that $b_{n}$ can only take finitely many values, because every entry of it can only be between $0$ and $2022$ and hence only have $2023$ values. In particular, $b_n$ can take only $2023^3$ many values. Therefore, by the pigeonhole principle applied to the vectors $b_0,b_1,\ldots,b_{2023^3}$, there exist $2023^3 \geq n>m \geq 0$ such that $b_n = b_m$. This implies that $T^{n}b_0 = T^mb_0$.

Now, $T$ is invertible since $a_n = (a_{n+3} - 2a_{n+2}-7a_{n+1})12^{-1} \pmod{2023}$ where $12^{-1}$ is the multiplicative inverse of $12$ modulo $2023$, and therefore one can retrieve $b_n$ from $b_{n+1}$ uniquely. Therefore, we obtain that $T^{n-m}b_0 = b_0$. This implies that $\begin{bmatrix}a_{n-m+2} \\ a_{n-m+1} \\ a_{n-m}\end{bmatrix} = \begin{bmatrix} 2\\1\\0\end{bmatrix}$. In particular, $a_{n-m} = 0$, as desired. At this point, we can iterate the argument forward since if $T^{n-m}b_0=b_0$ then $T^{k(n-m)}b_0 = b_0$ therefore $a_{k(n-m)} = 0$ will occur for any $k>0$, showing that $2023$ divides $a_{k(n-m)}$ for any $k \geq 1$ and hence infinitely many $a_n$.

That's how one would work IF $T$ didn't depend upon $n$. That's what allowed us to get the nice iterated formula $b_n = T^n b_0$ which was crucial for the proof.


Dear oh dear, $T$ depends upon $n$ though. So what do we do?

Simple : we note that even if there is movement in $n$ of the coefficient, that is still restricted to some finite amount of cyclic movement. After some time, the matrices will start repeating.

Let's see. Consider $5^n$. Yes, this changes with $n$. Going modulo $2023$, however, the sequence of coefficients starts cycling after sometime. That's because, as per Euler's theorem, $5^{\phi(2023)} \equiv 1 \pmod{2023}$, where $k=\phi(2023)$ is the totient function evaluated at $2023$. (You can calculate that number, let's just call it $k$ for now).

That is, $5^{k},5^{k+1},5^{k+2},\ldots$ modulo $2023$ looks exactly like $5^0,5^1,5^2,\ldots$ modulo $2023$.

How about $n^2$ though? Here too, cyclicity is obvious, simply because $(n+2023)^2 \equiv n^2$ modulo $2023$ for any $n$. Therefore, for example, $2023^2,2024^2,2025^2 \ldots$ modulo $2023$ looks exactly like $0^2,1^2,2^2,\ldots$ modulo $2023$.

It is this cyclicity that we can take advantage of, and we will do so as follows. Define $N = 2023k$ and $$ T_n =\begin{bmatrix} 5^n & n^2& 11\\1 &0&0 \\ 0&1&0 \end{bmatrix} $$ and note that if $b_n = \begin{bmatrix} a_{n+2}\\a_{n+1}\\a_{n}\end{bmatrix}$ then $b_{n+1} = T_nb_n\pmod{2023}$.

However, notice that $$ T_{n+N} = \begin{bmatrix} 5^{n+N} & (n+N)^2 & 11\\1 &0&0 \\ 0&1&0 \end{bmatrix} \equiv \begin{bmatrix} 5^{n} & {n}^2 & 11\\1 &0&0 \\ 0&1&0 \end{bmatrix} \equiv T_n \pmod{2023} $$ literally because that's how we chose $N$ : so that both $5^n$ and $n^2$ will be cyclic after $N$ steps. Now, note that for any $l \geq 0$, \begin{align*} b_{(l+1)N} &= T_{lN+N-1}T_{lN+N-2}\ldots T_{lN} b_{lN} \pmod{2023}\\ & = T_{N-1}T_{N-2}\ldots T_{0} b_{lN} \pmod{2023} \end{align*}

In particular, if we define the matrix $T' = T_{N-1}T_{N-2}\ldots T_{0}$ then $$ b_{(l+1)N} = T'b_{lN} \pmod{2023} $$

and you can see that we're back to the constant matrix situation. For completeness, let's execute the argument there once again. Note that $b_{lN} = T'^{l}b_0 \pmod{2023}$ for any $l \geq 0$ by our formula. Now, $b_{lN}$ can only take finitely many values, at most $2023^3$ of them to be precise. Hence, by the same pigeonhole principle argument there exists $2023^3 \geq n>m>0$ such that $b_{nN} = b_{mN}$. In particular, $T'^nb_0 = T'^mb_0$.

Now, $T'$ is invertible because each of the $T_n$ are invertible: play the same game as before and note that $11^{-1}$ modulo $2023$ is unique because $11$ is coprime to $2023$. Therefore, $T'^{n-m}b_0 = b_0$. Hence, $b_{(n-m)N} = b_0$.

In particular, since the last entry of $b_0$ is $a_0 =0$, it follows that $a_{(n-m)N} = 0$. Since $T'^{n-m}b_0 = b_0$, we get that $T'^{l(n-m)}b_0 = b_0$ for any $l \geq 1$. Thus, $a_{l(n-m)N} =0$ for any $l \geq 1$.

So we get that $2023 \mid a_{k(n-m)N}$ for any $k \geq 1$ and in particular there are infinitely many indices $j$ such that $2023$ divides $a_j$.