I have an assignment for tomorrow that ask me to prove that the sequence/function
$f(x) =\begin{cases}\dfrac x2\quad\quad\quad\text{if } x\text{ is even}\\3x+1\quad\;\text{if }x\text{ is odd}\end{cases}$
(where $x$ is a natural number)
will converge to $1$.
I have tried by hand and it seems to work but I have no idea where to start.
Thanks a lot.