We start by computing SK as the average of the first K integers: SK=K1+2+…+K=KK(K+1)/2=2K+1.
Next we form the sum of squares ∑j=1nSj2. Substituting the formula for Sj gives ∑j=1nSj2=∑j=1n4(j+1)2=41∑j=1n(j+1)2=41∑m=2n+1m2 by letting m=j+1.
Using the identity ∑m=1Mm2=6M(M+1)(2M+1) with M=n+1 and subtracting the first term gives 41(6(n+1)(n+2)(2n+3)−1)=41⋅6(n+1)(n+2)(2n+3)−6.
Expanding the cubic in the numerator, (n+1)(n+2)(2n+3)=2n3+9n2+13n+6, leads to 41⋅62n3+9n2+13n+6−6=242n3+9n2+13n=24n(2n2+9n+13).
From this final form we set A=24, B=2, C=9 and D=13.
Then A+B=24+2=26, and since 26/13=2, it follows that A+B is divisible by D.