Problem

Source: Dutch TST 2024, 3.4

Tags: number theory, number theory proposed, blackboard, Digits



Initially, a positive integer $N$ is written on a blackboard. We repeatedly replace the number according to the following rules: 1) replace the number by a positive multiple of itself 2) replace the number by a number with the same digits in a different order. (The new number is allowed to have leading digits, which are then deleted.) A possible sequence of moves is given by $5 \to 20 \to 140 \to 041=41$. Determine for which values of $N$ it is possible to obtain $1$ after a finite number of such moves.