Came up with the idea for this one while I was scratching my head over another "what comes next" puzzle here on Puzzling.SE
I wrote a small application which takes an integer and returns another integer.
Sometimes the application finds multiple integers to return, so it always returns the smallest one it finds.
Starting with '3' (seemed like a good number to start with), I used each integer that was returned as the next input, until I found the perfect place to stop!
3, 9, 5, 4, 2, 6, 7, 13, 110, 174, 155, ?
What was the number I stopped on and why is it the perfect place to stop?