Let $\{a_n\}$ be a sequence of integers satisfying the following conditions. $a_1=2021^{2021}$ $0 \le a_k < k$ for all integers $k \ge 2$ $a_1-a_2+a_3-a_4+ \cdots + (-1)^{k+1}a_k$ is multiple of $k$ for all positive integers $k$. Determine the $2021^{2022}$th term of the sequence $\{a_n\}$.
Problem
Source: KJMO 2021 P2
Tags: modular arithmetic, Sequence, Integer sequence, number theory
13.11.2021 19:38
The answer is 0. Denote $N=2021^{2021}$. Let $S_k=\sum_{i=1}^{k}{(-1)^{i+1}a_i}$ and $b_k=\frac{S_k}{k}$, then $b_k$ are integers. If there exist an integer $1\leq k \leq 2021N$ such that $a_k=b_k=0$, then it is easy to show that $a_i=b_i=0$ for all $k\leq i\leq 2021N$. Assume that all $b_k$ in the range is positive. Now we will observe the relationship of $b_k$ and $b_{k+1}$. If $S_k=kb_k$ is divisible to $k+1$, $b_{k+1}=\frac{k}{k+1}b_k<b_k$. Otherwise, there exists an integer $t$ such that $(k+1)t<kb_k<(k+1)(t+1)$. If $k$ is odd, $b_{k+1}=t<\frac{k}{k+1}b_k<b_k$, and if $k$ is even, $b_{k+1}=t+1<\frac{k}{k+1}b_k +1<b_k +1$, so $b_{k+1}\leq b_k$. Hence, we can conclude that $b_{k+2}\leq b_k -1$. Since $b_1=N$, $b_{2021N} \leq b_1 - \frac{2021N-1}{2}=N-\frac{2021N-1}{2}<0$, Contradiction. $\therefore a_{2021N}=b_{2021N}=0$
03.12.2021 05:41
@above To guarantee your assumption that all $b_k$ is nonnegative, we need to prove $ $ "$b_k > 0$, $b_{k+1} < 0$ is impossible." If such event occurs, $S_k = kb_k \geq k$ and $S_{k+1} = (k+1)b_{k+1} \leq -(k+1)$. It is impossible because $0\leq a_{k+1} <k+1$.
28.04.2022 06:01
@above It is guaranteed that all $b_k$ is nonnegative, since I calculated the exact value of $b_k$ in the range. $b_1>0$ and the exact values I suggested inductively are nonnegative, there would be an index $i$ such that $b_i=0$ and $b_j>0$ for all $j<i$. Then, we can say that $b_{2020N}=0$.