Thread: Sum of a series of numbers

1. Sum of a series of numbers

Calculate the sum of the squares of following numbers:

2,5,8,11,...,(3n-4),(3n-1)

???

2. The sequence is $\displaystyle a_k = 3k - 1$

So you are trying to find $\displaystyle \sum_{k=1}^{n}(3k-1)^2$

$\displaystyle \sum_{k=1}^{n}(9k^2 - 6k +1)$

Now calculate $\displaystyle \sum_{k=1}^{n}9k^2 - \sum_{k=1}^{n}6k + \sum_{k=1}^{n}1$.

3. Thanks man

Canīt believe, such a fast reply.

Thanks for the formula. My problem now is how to calculate the sum. I mean the n is not specified so the sum will be humongous. Please help me with the rest?

4. Hello, lynch-mob!

If you're familiar with summation formulas,
. . wingless has an excellent solution.

Here's a very primitive method for constructing the formula.

Calculate the sum of the squares of following numbers:
. . $\displaystyle 2, 5, 8, 11, \hdots, (3n-1)$

Consider the partial sums of: .$\displaystyle f(n) \;=\;2^2 + 5^2 + 8^2 + 11^2 + \hdots$

We have the sequence: . $\displaystyle 4,\: 29,\: 93,\: 214,\: 410,\: 699,\: 1099,\: \hdots$

Take the difference of consecutives terms,
. . take the differences of the differences, and so on . . .

$\displaystyle \begin{array}{ccccccccccccccc}\text{Sequence: } & 4 && 29 && 93 && 214 && 410 && 699 && 1099 \\ \text{1st diff.} & & 25 && 64 && 121 && 196 && 289 && 400 \\ \text{2nd diff} & & & 39 && 57 && 75 && 93 && 111 \\ \text{3rd diff} & & & & 18 && 18 && 18 && 18\end{array}$

We find that the third differences are constant.
. . Hence, the generating function is a cubic.

The general cubic function is: .$\displaystyle f(n) \;=\;an^3 + bn^2 + cn + d$

Use the first four known values to form a system of equations.

$\displaystyle \begin{array}{ccccc} f(1) = 4: & a + b + c + d &=& 4 & {\color{blue}[1]} \\ f(2) = 29: & 8a + 4b + 2c + d &=& 29 & {\color{blue}[2]} \\ f(3) = 93: & 27a + 9b + 3c + d &=& 93 & {\color{blue}[3]} \\ f(4) = 214: & 64a + 16b + 4c + d &=& 214 & {\color{blue}[4]} \end{array}$

$\displaystyle \begin{array}{ccccc}\text{Subtract [2] - [1]:} & 7a + 3b + c &=& 25 & {\color{blue}[5]} \\ \text{Subtract [3] - [2]:} & 19a + 5b + c &=& 64 & {\color{blue}[6]} \\ \text{Subtract [4] - [3]:} & 37a + 7b + c &=& 121 & {\color{blue}[7]} \end{array}$

$\displaystyle \begin{array}{ccccc}\text{Subtract [6] - [5]:} & 12a + 2b &=& 39 & {\color{blue}[8]} \\ \text{Subtract [7] - [6]:} & 18a + 2b &=& 57 & {\color{blue}[9]} \end{array}$

$\displaystyle \text{Subtract [9] - [8]: }\;\;6a \:=\:18\quad\Rightarrow\quad\boxed{ a \:=\:3}$

Substitute into [8]: .$\displaystyle 36 + 2b \:=\:39\quad\Rightarrow\quad\boxed{ b \:=\:\frac{3}{2}}$

Substitute into [5]: .$\displaystyle 21 + \frac{9}{2} + c \:=\:25\quad\Rightarrow\quad\boxed{ c \:=\:-\frac{1}{2}}$

Substitute into [1]: .$\displaystyle 3 +\frac{3}{2} - \frac{1}{2} + d \:=\:4\quad\Rightarrow\quad\boxed{d \:=\:0}$

Hence: .$\displaystyle f(n) \;=\;3n^3 + \frac{3}{2}n^2 - \frac{1}{2}n \quad\Rightarrow\quad\boxed{ f(n) \;=\;\frac{n}{2}(6n^2 + 3n-1)}\quad\hdots$ There!

5. Thanks guys

Umm...when i put number 4 in the function i get 214. This is the correct answer for the sum of that sequence. So the correct answer when n is unspecified is the actual formula?

I have trouble understanding wingless summation formula, i hope somebody could explain that one for me.

I find it so hard to understand that there is a forum like this where answers (math answers) are given the same day as the question. How do you write math functions and symbols here. Itīs so much easier to understand than text like this 2*14(5X-3)/4*^2.

6. Aaaah wingless

So now I understand. Your summation formula gives me the number I get when I square the n:th number. Lets say the third number in the sequence is 8.

$\displaystyle 9*(3)^2-(6*3)+1 = 64$

... which is number 8 squared. But how do I sum all the previous and consecutive squared numbers up to the n:th number.

Thanks!

7. You just use the rule in summation notation:

$\displaystyle \sum_{k=1}^n f(k) = \sum_{k=1}^n \frac{k}{2}(6k^2 + 3k - 1)$

8. The letter $\displaystyle \sum$ (sigma) means sum.

$\displaystyle \sum_{k=n}^m f(k) = f(n) + f(n+1) + f(n+2) + ... + f(m-1) + f(m)$

The sum has m-n+1 terms.

For example, $\displaystyle \sum_{k=0}^{5}(2k+1) = 1 + 3 + 5 + 7 + 9 + 11 = 36$

A few identities and formulas with sigma:

$\displaystyle \sum_{k=n}^m a\cdot f(k) = a\cdot \sum_{k=n}^m f(k)$

$\displaystyle \sum_{k=1}^n k = \frac{n(n+1)}{2}$

$\displaystyle \sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}$

$\displaystyle \sum_{k=1}^n k^3 = \left ( \frac{n(n+1)}{2} \right )^2$

Using these formulas, try to find
$\displaystyle \sum_{k=1}^{n}9k^2 - \sum_{k=1}^{n}6k + \sum_{k=1}^{n}1$

9. Hello, lynch-mob!

Originally Posted by wingless

The sequence is $\displaystyle a_k = 3k - 1$
So you are trying to find $\displaystyle \sum_{k=1}^{n}(3k-1)^2$
$\displaystyle \sum_{k=1}^{n}(9k^2 - 6k +1)$
Now calculate $\displaystyle \sum_{k=1}^{n}9k^2 - \sum_{k=1}^{n}6k + \sum_{k=1}^{n}1$
We have: .$\displaystyle S \;=\;9\sum^n_{k=1}k^2 - 6\sum^n_{k=1}k + \sum^n_{k=1}1\;\;{\color{blue}[1]}$

These are standard summation formulas:

. . $\displaystyle \boxed{\sum^n_{k=1}k^2 \;=\;\frac{n(n+1)(2n+1)}{2}} \qquad \boxed{\sum^n_{k=1} k \;=\;\frac{n(n+1)}{2}}\qquad \boxed{\sum^n_{k=1}1 \;=\; n}$

Substitute them into [1]: .$\displaystyle S \;\;=\;\;9\!\cdot\!\frac{n(n+1)(2n+1)}{6} \:- \:6\!\cdot\!\frac{n(n+1)}{2} \:+ \:n$

. . and we get: . $\displaystyle S \;\;=\;\;\frac{n}{2}(6n^2 + 3n-1)$

10. Aaaah

Thank you so much guys. Now I get it. All the time I was wondering how can I calculate the formula when n is undefined. So the answer will be a function where n is the n:th number in the series and S is the total sum of all the squared numbers.

This must be simple to you guys, but such a crash course in sums to me. I think Iīm finally starting to get it!

Thanks wingless, soroban and aryth!