Find the largest $k$ for which there exists a permutation $(a_1, a_2, \ldots, a_{2022})$ of integers from $1$ to $2022$ such that for at least $k$ distinct $i$ with $1 \le i \le 2022$ the number $\frac{a_1 + a_2 + \ldots + a_i}{1 + 2 + \ldots + i}$ is an integer larger than $1$.

[i](Proposed by Oleksii Masalitin)[/i]
1. Define \( b_i = \frac{a_1 + a_2 + \ldots + a_i}{1 + 2 + \ldots + i} \).
2. We need to find the largest \( k \) such that \( b_i \) is an integer greater than 1 for at least \( k \) distinct \( i \) with \( 1 \le i \le 2022 \).

### Achievability of \( k = 1011 \)
3. Consider the permutation where \( a_i = 2i \) for \( i \leq 1011 \). This means:
   \[
   a_1 + a_2 + \ldots + a_i = 2(1 + 2 + \ldots + i) = 2 \cdot \frac{i(i+1)}{2} = i(i+1)
   \]
   \[
   1 + 2 + \ldots + i = \frac{i(i+1)}{2}
   \]
   Therefore,
   \[
   b_i = \frac{a_1 + a_2 + \ldots + a_i}{1 + 2 + \ldots + i} = \frac{i(i+1)}{\frac{i(i+1)}{2}} = 2
   \]
   for \( i \leq 1011 \). Thus, \( b_i = 2 \) for \( i \leq 1011 \), which is an integer greater than 1.

### Upper Bound for \( k \)
4. We need to show that at most one \( i \geq 1011 \) can have \( b_i \) as an integer larger than 1.
5. For \( i \geq 1011 \), consider the maximum possible value of \( b_i \):
   \[
   b_i \leq \frac{2022 + 2021 + \ldots + (2022 - i + 1)}{1 + 2 + \ldots + i} = \frac{2022 + (2022 - 1) + \ldots + (2022 - i + 1)}{\frac{i(i+1)}{2}}
   \]
   The numerator is the sum of the first \( i \) terms of an arithmetic sequence starting from 2022 and decreasing by 1 each term:
   \[
   \text{Sum} = \frac{i}{2} (2 \cdot 2022 - (i - 1)) = \frac{i}{2} (4044 - i + 1) = \frac{i (4045 - i)}{2}
   \]
   Therefore,
   \[
   b_i \leq \frac{\frac{i (4045 - i)}{2}}{\frac{i(i+1)}{2}} = \frac{4045 - i}{i + 1}
   \]
   For \( i = 1011 \),
   \[
   b_{1011} \leq \frac{4045 - 1011}{1011 + 1} = \frac{3034}{1012} < 3
   \]
   Thus, \( b_i \) can only be 2 for \( i \geq 1011 \).

6. If \( b_i = 2 \) for some \( i \geq 1011 \), then:
   \[
   b_{i+1} = \frac{a_1 + a_2 + \ldots + a_i + a_{i+1}}{1 + 2 + \ldots + i + (i+1)} = \frac{2 \cdot \frac{i(i+1)}{2} + a_{i+1}}{\frac{i(i+1)}{2} + (i+1)}
   \]
   Since \( a_{i+1} \leq 2022 \),
   \[
   \frac{a_{i+1}}{i+1} \leq \frac{2022}{i+1} \leq \frac{2022}{1012} < 2
   \]
   As \( b_{i+1} \) is the mediant of \( b_i \) and \( \frac{a_{i+1}}{i+1} \), it implies \( b_{i+1} < 2 \). Therefore, if \( b_i = 2 \) for any \( i \geq 1011 \), all further \( b_j \) for \( j > i \) will be less than 2 and cannot be integers.

7. Thus, the maximum number of \( b_i \) that are integers larger than 1 is the first 1010 and at most 1 from the remaining terms. Therefore, \( k \leq 1011 \).

The final answer is \( \boxed{1011} \)