If the sum of the first \(n\) terms of an AP is 12[3n2+7n], then find its nth term. Hence, write its 21st term.