My comment conveniently ignores the
one of the things I am interested in is the count of how many repetitions of the sequence it took to reach 1
but I enjoyed the problem/solution and wanted to comment so, hey ...
Because the tool we're using to solve this poser is SQL, I'd like to see the solution 'learning' about numbers that it knows will eventually reach 1 and therefore cutting corners. So I'd INSERT into a ProvedNumbers table once I hit 1 or
hit a number that was already in ProvedNumbers.
e.g. I've learned that 8 goes 4, then 2, then 1. So when I tackle 10 I can stop at 10,5,16,8 and add 10 to ProvedNumbers. This will then help when I do 12 and 13 and they reach 10.
Rob - I look forward to the product of more "particularly idle evenings"
Isle of Man