Square of sum

I just finished Euler#6, and the sum of square was an easy to find formula (I had no ever had experience with a pyramid number before), but the square of sum formula was for some reason harder. But I think I found it:

square of sum = ((n+1)(n/2)^2) for 1 to n


Is this right? It seems to work, but I'd hate to use it and found it's not a real formula
No,

Square of sum=(((n^2)+n)/2)^2


At least it works for me
Weird, they both get to the same answer. Though ASFAIK, they are not equal formulas.
They look equivalent to me, distribute to get (n^2)/2 + n/2 == (n^2 + n)/2 == n(n + 1)/2 which IIRC is summation of i.
Ah I had some parentheses misplaced when I copied this to paper.
Topic archived. No new replies allowed.