Question 45
Among all the permutations $(a_1, a_2, \dots, a_n)$ of the set $\{1, 2, \dots, n\}$ ($n \ge 1$ an integer), consider those satisfying that $2(a_1 + a_2 + \dots + a_m)$ is divisible by $m$ for each $m = 1, 2, \dots, n$. Compute the total number of such permutations.