Developed algorithm to determine the nth prime.