I am trying to use recursion to calculate the nth prime. It works up until i believe around 300 when the interpreter says "maximum recusrion depth exceeded." Here is the code i wrote.
Code:
def program(n): ## initializes
    if n == 1: ## checks for special case of even prime 
        print 2
        return None 
    counter = 1
    index = 3
    nthprime(n, counter, index) ## calls nthprime which
...