Evalute the following sum: $ 1 + 2 + 2 + 3 + 4 + 4 + 5 + 6 + 6 + . . . .+ (n-1) + n + n$.
I tried doing it but I keep getting the wrong answer. I've used known sums to solve it.
Evalute the following sum: $ 1 + 2 + 2 + 3 + 4 + 4 + 5 + 6 + 6 + . . . .+ (n-1) + n + n$.
I tried doing it but I keep getting the wrong answer. I've used known sums to solve it.
On
We can group, $$\sum_{r=1}^m(2r-1)+2\sum_{r=1}^m(2r)$$ if $n=2m$
Or
$$\sum_{r=1}^m(2r-1)+2\sum_{r=1}^m2(r-1)$$ if $n=2m-1$
On
Reverse the sequence and add term-wise to the original: $$ 1 + 2 + 2 + 3 + 4 + 4 + 5 + 6 + 6 + . . . .+ (n-1) + n + n$$ $$ n + n + (n-1) + . . . . + 6 + 6 + 5 + 4 + 4 + 3 + 2 + 2 + 1$$
All triples will sum to $(n+1)+(n+2)+(n+1)=3n+4$, and each number is counted twice. But, beware, $n$ must be even and there are only $\frac n2$ triples ! $$S_n=\frac12\frac n2(3n+4)=\frac{3n^2+4n}4.$$
Check: $S_2=5$, $S_4=16$, $S_6=33$...
For odd $n$, we have to infer that the sum stops at the odd term, and $$S_n=S_{n-1}+n=\frac{3(n-1)^2+4(n-1)}4+n=\frac{3n^2+2n-1}{4}.$$
Check: $S_1=1$, $S_3=8$, $S_5=21$...
Assuming $n$ is even
$$S=1 + 2 + 2 + 3 + 4 + 4 + 5 + 6 + 6 + . . . .+ (n-1) + n + n$$ $$S=(1+2+3+\cdots+(n-1)+n)+(2+4+6+\cdots+n)$$ $$S=\sum_{k=1}^{n} k +\sum_{k=1}^{n/2} 2k$$
$$S=\frac{n(n+1)}{2}+\frac{n}{2}\left(\frac{n}{2}+1\right)= \frac{2n(n+1)}{4}+\frac{n(n+2)}{4} =\frac{3n^2+4n}{4}$$