Find the n th term that genarates the pattern for the sequence