If the number is even then it divides by 2, but if the number is odd then it will times it by 3 and add 1. It does this until it hits 1. press space to hide variables