If $p$ and $q$ are the sum and the sum of squares of $n$ successive integers beginning with '$a$' then $nq-p^2$ is
$$ p=\frac{n}{2}[2a+n-1]=na+\frac{n(n-1)}{2}\\ q=a^2+(a+1)^2+(a+2)^2+...+(a+n-1)^2\\ =na^2+2a[1+2+...+(n-1)]+1^2+2^2+...+(n-1)^2\\ =na^2+2a\frac{n(n-1)}{2}+\frac{n(n-1)(2n-1)}{6}\\ =na^2+an(n-1)+\frac{n(n-1)(2n-1)}{6} $$ $$ nq-p^2=n^2a^2+an^2(n-1)+\frac{n^2(n-1)(2n-1)}{6}-n^2a^2-\frac{n^2(n-1)^2}{4}-an^2(n-1)\\ =\frac{n^2(n-1)(2n-1)}{6}-\frac{n^2(n-1)^2}{4} \implies \text{ Independent of } a $$
But my reference says $nq-p^2$ is dependent on $a$, what is going wrong here ?