Problem

Source: Canadian Junior Mathematical Olympiad - CJMO 2021 p2

Tags: remainder, number theory



How many ways are there to permute the first $n$ positive integers such that in the permutation, for each value of $k \le n$, the first $k$ elements of the permutation have distinct remainder mod $k$?