# Andrew's recursive dream

**Discrete Mathematics**Level 3

Once Andrew was trying hard to sleep (slack people motivated him to) and finally he was asleep. However during his sleep he thought upon the recursive relations which was a topic of the problem writing party. In his dream , he came across a certain sequence \(a_1,a_2,a_3 \dots ,a_{n+1}\) which followed the recurrence relation \(a_{k+1}=2a_{k-1}+3a_k\) for integer \(k>1\) .

A weird blast took place in Andrew's dream and a certain ugly expression appeared spontaneously:

\[\dfrac{2(a_1+a_n)+5a_2-a_{n+1}}{a_3+a_4+\dots+a_{n-1}} = \dfrac{2(a_1+a_n)+5a_2-a_{n+1}}{\displaystyle\sum_{x=3}^{n-1} a_x}\]

Now your job is to find the value of above expression which randomly appeared in Andrew's sweet recursive mathematical dream.