Press the flag and enter a number. If the number is even, it will divide by two. If it is odd, it will multiply by 3 and add 1. Then it repeats until the number reaches one, which is the point at which the sequence repeats (from there, the number goes to 4, then 2, then 1 again and repeats)
This is the infamous Collatz problem. Does every number eventually reach the repeating point? For more info see this: https://en.wikipedia.org/wiki/Collatz_conjecture