Try this one:

m must be > 0

n=m
do
if (n mod 2) <> 0 then n=3*n+1
else n=n/2
loop until n=1


Now prove that this will always end for any number > 0..

Good luck!