I am doing some studying on the collatz conjecture. I spend a while researching and came across the following exercise in R studio. I tried it for a while, but couldn\'t get it