# Pattern recognition for $S_n=2+5+13+35+…+n^{th}_{term}$

I want to find sum of the first $n^{th}$ term of this sqequence . $$2,5,13,35,97,275,793,...\\s_n=2+5+13+35+97+...$$

What is the closed form formula for $s_n$?

• The sequence $2,5,13,35,97,275,793, \dots$ is oeis.org/A007689 – lhf Aug 18 '17 at 11:53

If you look at number again , in your problem .It would be $$2,5,13,35,97,275,393,...\\1+1,2+3,4+9,8+27,16+81,32+243,...$$ so it would be $$2^0+3^0,2^1+3^1,2^2+3^2+,...\\\implies a_n=2^{n-1}+3^{n-1}$$
$S_n$ is sum of two geometric progression $$s_n=\sum_{k=0}^{n}(2^{k}+3^{k})=\\\sum_{k=0}^{n}(2^{k})+\sum_{k=0}^{n}(3^{k})=\\1.\cdot\frac{2^{n}-1}{2-1}+1.\cdot\frac{3^{n}-1}{3-1}$$

• 7th term should be 793 – Atul Mishra Aug 18 '17 at 11:32
• A reasonable guess, but such "find the pattern in a sequence"-questions are always problematic because we never can be sure that this pattern is actually meant. However because we want the sums, this pattern actually seems to be the desired one. (+1) for spotting the pattern, which I would not consider to be easy. – Peter Aug 18 '17 at 11:35
• Can you bring another method ,to solve it ? – roshanaie Aug 18 '17 at 11:44

Alternatively, the sequence is: $$2,3\cdot 2-1,3\cdot 5-2,3\cdot 13-4,3\cdot 35-8,...$$ It is the recurrence relation: $$a_n=3a_{n-1}-2^{n-2},a_1=2.$$ Divide it by $2^{n}$: $$\frac{a_n}{2^{n}}=\frac{3a_{n-1}}{2^{n}}-\frac14.$$ Denote: $b_n=\frac{a_n}{2^n}$ to get: $$b_n=\frac{3}{2}b_{n-1}-\frac{1}{4},b_1=1.$$ Solution is: $$b_n=\frac{1}{3}\left(\frac{3}{2}\right)^n+\frac12.$$ Hence: $$a_n=2^nb_n=2^{n-1}+3^{n-1}.$$ Now the sum $S_n$ is calculated in the same way as in previous solution.