for eg.if the no.z r 1,4,9,16...
then yu keep findin the diff. until it reaches a single no. btween ol..tht is for the first one:3,second:5,third:7 then the sme thin amongst the three no.z..wen lastly ull reach to 1..therefore 1n and raise to the no. of tyms u found the diff.exclude the tym wen u gt 1...so the ans is 1n^2...hope this helps and there is no easy way except the above formula for help at sequences..