In an arithmetic sequence the seventh term is −13, the nineteenth term is 47 and the nth term is 217.
Find the value of n.