Problem

Source: kjmo 2022 P7

Tags: combinatorics



Consider $n$ cards with marked numbers $1$ through $n$. No number have repeted, namely, each number has marked exactly at one card. They are distributed on $n$ boxes so that each box contains exactly one card initially. We want to move all the cards into one box all together according to the following instructions The instruction: Choose an integer $k(1\le k\le n)$, and move a card with number $k$ to the other box such that sum of the number of the card in that box is multiple of $k$. Find all positive integer $n$ so that there exists a way to gather all the cards in one box. Thanks to @scnwust for correcting wrong translation.