Problem

Source: 2017 Belarus Team Selection Test 3.3

Tags: number theory, combinatorics



The following operations are performed to the natural numbers $x$: $x\to x+2$ or $x\to x+n$, $x\to x\cdot 2$ or $x\to x\cdot n$. Additions and multiplications are performes alternatively (adding $2$ or $n$ and multiplying by $2$ or by $n$ one can choose as he wishes for each step). The number $m$ is called attainable if it can be obtained from $1$ by a sequence of such operations, otherwise $m$ is called unattainable. Prove that if $n=5$ or $n=7$, then there are infinitely many unattainable numbers.