# Interesting permutations

Author: mathforces
Problem has been solved: 2 times

Русский язык | English Language

We call a number $n$ interesting if there exists a permutation $a_1, a_2, \dots, a_n$ of numbers $1, 2, \dots, n$ such that for any indices $i, j \in \{1,2, \dots , n \}$ for which $2020i-j$ is divisible by $n$, the number $a_i^{2020}-a_j$ is divisible by $n + 1$. Let $k \leq 2^{127}+1$ is the greatest interesting number. Find number of divisors of $3k+6$.