Problem

Source: Centroamerican and Caribbean Math Olympiad 2023, P2

Tags: number theory, OMCC, blackboard, Operation



Octavio writes an integer $n \geq 1$ on a blackboard and then he starts a process in which, at each step he erases the integer $k$ written on the blackboard and replaces it with one of the following numbers: $$3k-1, \quad 2k+1, \quad \frac{k}{2}.$$provided that the result is an integer. Show that for any integer $n \geq 1$, Octavio can write on the blackboard the number $3^{2023}$ after a finite number of steps.