I got pretty interested in this problem when I saw a Veritasium video on it. If your number is odd, multiply by 3 and add 1. If it's even, divide by 2. Any positive natural integer will end in an infinite loop of 4, 2, 1.
Thank to @Veritasium for informing me on this interesting problem. If you enter your natural number and it is above 1,000, do not add a coma. There is a number cap so if you spam for a long time, it won't work.