Finding the nth term and evaluating series