I think DDay pointed the way to work it out with pen and paper -- or on screen, in his case. Once your exit condition test is in place, work out the result of the function by hand with starting values of n = 2, 3, 4, 5 and so on. You'll soon notice a pattern in the results!

I'm assuming you can't start with n negative, by the way.

BB