Find the common difference of the A.P, if the sum of first n terms of the sequence is given by Sn=n2+2n+6?