Not sure if all the above posts helped or not, but


If I run the code in the first post and enter 120, it displays 2 2 2 3 5...which is what you say it should display.