text: World's most popular travel blog for travel bloggers.
  
  # Finding a solution to the following conditions?
  
  , ,
  Problem Detail:
  
  So for these 5 conditions, I am trying to find the solution/formula for them. What would $a_n$ equal basically? If it helps, the recurrence relation these 5 conditions were generated from was $a_n = a_{n - 1} + 2n$. Any help would be greatly appreciated.
  
  \begin{align*} a_0 &= 4 \\ a_1 &= 6 \\ a_2 &= 10 \\ a_3 &= 16 \\ a_4 &= 24 \end{align*}
  
  ###### Answered By : Yuval Filmus
  
  There are infinitely many sequences starting $4,6,10,16,24$. If I understand you correctly, this sequence was generating according to the rule $a_n = a_{n-1} + 2n$ with the initial value $a_0 = 4$. In that case, you have $$a_n = a_0 + \sum_{k=1}^n (2k) = a_0 + 2 \frac{n(n+1)}{2} = n^2 + n + 4.$$