Sean is right, the problem is that n keeps getting bashed back to 5, so the recursion never ends.
He is also right to hint that it might be due the way you call it. In order to use it, you should not have that n=5 line, and you should not just press F5 when you are on the file: instead, at the command line, you should command
if what you want is the 5th order curve.
Best Answer