The solution is easy.
The sum is always of the type of q odd integer starting from 2 p+1 ending with 2(p+q)+1
S_p,q=\Sum_k=p^p+q-1 (2k+1) = q (2p +q)
At the first set we sum 1 term so q=1 and p=0, at the second step we sum 2 terms so q=2 and p=1 etc
We just have to find the starting integer p at step q.
But at set q we have skipped 1 + 2 + ... + q-1 = q(q-1)/2 odd integers therefore
p = q (q-1)/2
With this value of p
S_p,q = q^3