cycle counter for set of rules

1. input n
2. print n
3. if n = 1 then STOP
4. if n is odd then n=3n+1
5. else n=n/2
6. GOTO 2

Given two numbers, find biggest cycle using ^^ for all numbers in between the inputted two.