If the sum of first n terms of an A.P. is 12(3n2+7n), then find its nth term. Hence write its 20th term.