Let $a_1,a_2, ...,a_{2020}$ be a permutation of $1,2,3,...,2020$. How many permutations of $a_1, a_2, a_3, ..., a_{2020}$ are there such that $$ |a_1-1|=|a_2-2|=\ldots=|a_{2020}-{2020}|? $$
I thought 2020; if a_1=1, then a_2020=2020,.. a_1=2, then a_2020=2019, a_2018=2017,.... a_1=3, then a_2020=2018,.... but it seemed wrong
Note that if $a_k = 1$, then $\lvert 1 - k \rvert = k - 1 = \lvert a_1 - 1 \rvert = a_1 - 1$, so $a_1 = k$. Then $\lvert a_2 - 2 \rvert$ must be $k - 1$, so $a_2$ must be $k+1$, and so on.
If we let $l = k - 1$, the permutation must consist of disjoint involutions swapping $m$ and $m + l$ for each $m$ equivalent to $1, \dotsc, l$ modulo $2l$:
$$ (1,1+l)(2,2+l)\dotsb(l,2l)\,(2l+1,3l+1)(2l+2,3l+2)\dots(3l,4l)\,(4l+1,5l+1)\dotsb $$
For this to work, $n$ must split into chunks of size $2l$. For $n = 2020$, this works with $l \in \{1, 2, 5, 10, 101, 202, 505, 1010\}$. Along with the identity permutation, this gives 9 solutions: