How many sequences $a_1, a_2, \dots,a _{2015}$ that answer the following conditions exist?

82 Views Asked by At

How many sequences $\{a_1, a_2, \dots,a _{2015}\}$ that answer the following conditions exist:

  1. For every $i$: $a_i = 1$ or $a_i = -1$

  2. The sum of the series is $7$

  3. For every $j$ between $1$ and $2015,$ the sum: $a_1 + a_2 + \dots +a_j >0$.

I need to find the amount of all those possible sequences. The solution probably has to do with the Catalan numbers.