<s>[INST] Problem about sum of arithemtic progression and geometric progression Question: An arithmetic sequence has a common difference of $1$ and a geometric sequence has a common ratio of $3$. A new sequence is formed by adding corresponding terms of these two progressions. It is given that the second and fourth term of the sequence are $12$ and $86$ respectively. Find, in terms of $n$,


*

*the $n^{th}$ term,

*the sum of the first $n$ terms


of the new sequence.
Answers: 


*

*$n+1+3^n$.

*$\frac 1 2 n(n+3) + \frac{3}{2} 3^n - \frac{3}{2}$. 


Working so far
I am stuck getting different values for $a$.

 [/INST] (i)
the first sequence is: $u_n=u_0+n$
the second sequence is $v_n=v_0 \cdot 3^n$
so the new sequence is : $w_n=u_0+n+v_0 \cdot 3^n$
since $w_2=12$ and $w_4=86$ 
then $u_0+2+v_0\cdot9=12$ and $u_0+4+v_0\cdot81=86$ 
then $u_0=1$ and $v_0=1$
so $w_n=1+n+3^n$
(ii)
$\sum\limits_{k=0}^{n-1}w_k = \sum\limits_{k=0}^{n-1}1+\sum\limits_{k=0}^{n-1} k+\sum\limits_{k=0}^{n-1}3^k = n-1 + n\cdot(n-1)/2 + (3^n-1)/2$
</s>