# Sequence, sum of elements

• October 12th 2011, 10:40 AM
gollum
Sequence, sum of elements
Hi!

Could you help me with this assignment?

What is the sum of $n$ first elements of the sequence $(a_n)$where:

$a_1=2, a_2=22, a_3=222, ...$ ?

Thanks.
• November 4th 2011, 11:54 AM
veileen
Re: Sequence, sum of elements
First you should have tried to find a formula for $a_{n}$. It's easy to observe that:

$a_{n}=2(10^{n-1}+10^{n-2}+...+10^{1}+10^{0})=2\cdot \frac{10^{n}-1}{10-1}=\frac{2}{9}\cdot (10^{n}-1)$

Now that you "know" $a_{n}$ it's simpler to calculate the sum:

$a_{1}+a_{2}+...+a_{n-1}+a_{n}=\frac{2}{9}\left ( 10^{1}+10^{2}+...+10^{n-1}+10^{n} -n\right )=\frac{2}{9}\left ( 10\cdot \frac{10^{n}-1}{10-1} -n \right )$

$S_{n}=\frac{2}{9}\cdot \frac{10^{n+1}-10-9n}{9}=\frac{2}{81}\cdot \left (10^{n+1}-9n-10 \right )$

Pretty clear I hope...