A sequence $\{a_n\}$ is defined such that $a_i=i$ for $i=1,2,3\ldots,2020$ and for $i>2020$, $a_i$ is the average of the previous $2020$ terms. What is the largest integer less than or equal to $\displaystyle\lim_{n\to\infty}a_n$?

[i]2020 CCA Math Bonanza Lightning Round #4.4[/i]
1. We start by noting the definition of the sequence $\{a_n\}$:
   - For $i = 1, 2, 3, \ldots, 2020$, $a_i = i$.
   - For $i > 2020$, $a_i$ is the average of the previous 2020 terms.

2. We express the condition for $i > 2020$ mathematically:
   \[
   a_i = \frac{a_{i-1} + a_{i-2} + \cdots + a_{i-2020}}{2020}
   \]

3. To find the limit $\lim_{n \to \infty} a_n$, we assume that the sequence converges to a limit $L$. If $a_n \to L$, then for large $n$, $a_{n-1}, a_{n-2}, \ldots, a_{n-2020}$ will also approach $L$. Therefore, we have:
   \[
   L = \frac{L + L + \cdots + L}{2020} = \frac{2020L}{2020} = L
   \]
   This confirms that if the sequence converges, it converges to $L$.

4. Next, we need to find the value of $L$. We sum the equations for $a_{2021}, a_{2022}, \ldots, a_{n+2020}$:
   \[
   \begin{aligned}
   a_{2021} &= \frac{a_1 + a_2 + \cdots + a_{2020}}{2020}, \\
   a_{2022} &= \frac{a_2 + a_3 + \cdots + a_{2021}}{2020}, \\
   &\vdots \\
   a_{n+2020} &= \frac{a_n + a_{n+1} + \cdots + a_{n+2019}}{2020}.
   \end{aligned}
   \]

5. Summing these equations, we get:
   \[
   \sum_{i=2021}^{n+2020} a_i = \frac{1}{2020} \left( \sum_{i=1}^{n+2019} a_i \right)
   \]

6. We know the initial terms $a_1, a_2, \ldots, a_{2020}$ are simply $1, 2, \ldots, 2020$. The sum of these terms is:
   \[
   \sum_{i=1}^{2020} i = \frac{2020 \cdot 2021}{2} = 2020 \cdot 1010.5 = 2041210
   \]

7. As $n \to \infty$, the sum of the terms from $a_{2021}$ onwards will be dominated by the limit $L$. Therefore, we can approximate:
   \[
   \sum_{i=2021}^{n+2020} a_i \approx (n+2020-2020) L = nL
   \]

8. Substituting back, we get:
   \[
   nL \approx \frac{1}{2020} \left( 2041210 + nL \right)
   \]

9. Solving for $L$, we multiply both sides by $2020$:
   \[
   2020nL \approx 2041210 + nL
   \]

10. Rearranging terms, we get:
    \[
    2020nL - nL \approx 2041210 \implies 2019nL \approx 2041210 \implies L \approx \frac{2041210}{2019n}
    \]

11. Simplifying, we find:
    \[
    L \approx \frac{2041210}{2019} \approx 1010.5
    \]

12. The largest integer less than or equal to $L$ is:
    \[
    \boxed{1010}
    \]