# Find sum of numbers in the nth row

There is an arrangement:

1
2 3 4
5 6 7 8 9
10 11 12 13 14 15 16
.   .    .
.   .    .


N rows

How can I find the sum of numbers in the nth row?

I tried the following: 1st row has 1 number 2nd row has 3 numbers 3rd row has 5 and so on.. so this is an AP

a(n) = 1+(n-1)2 = 2n - 1, this gives number of elements in nth row. But I can't find any way to proceed.

• Hint: consider squares. Sep 6, 2016 at 11:17
• The $n$-th row starts with number $n^2-2n+2$ and has $2n-1$ elements. Sep 6, 2016 at 11:21

We have that the sum in the $n$-th row is $$\sum_{k=(n-1)^2+1}^{n^2}k=\sum_{k=1}^{n^2}k-\sum_{k=1}^{(n-1)^2}k=\frac{n^2(n^2+1)}{2}-\frac{(n-1)^2((n-1)^2+1)}{2}\\=(2n-1)(n^2-n+1).$$
P.S. Alternatively you can also multiply the number of elements in that row, $2n-1$, by the average of the symmetric numbers (which is constant), $(n^2+(n-1)^2+1)/2=(n^2-n+1)$.
You can use Gauss' trick to get a nice formula. Notice that the $n$-th row starts with $(n-1)^2 + 1$ and it has $2n-1$ elements. Pair the $i-th$ and the $(2n-i)$-th element in the row. The sum of each pair is $n^2 - 2n + 2 + n^2 = 2n^2 - 2n + 2$. Then you have $\frac{2n-1}{2}$ pairs (we count the middle element as half-pair), hence the total sum is:
$$\frac{2n-1}{2}(2n^2 - 2n+2) = (2n-1)(n^2-n+1)$$
HINT.-Notice that the row $n^{th}$ it has $2n-1$ terms and that ends with $n^2$ (because of the known formula $1+3+5+.....=n^2$) hence this row is equal to $$((n-1)^2+1)+((n-1)^2+2)+.....+((n-1)^2+2n-1)$$ i.e $$((n-1)^2+1)+((n-1)^2+2)+.....+n^2$$ Now it is easy the calculation.