Number of ways of obtaining $0$ by summing only $1$ and $-1$ in ordered manner: Let $n$ represent the number of terms
- $n=2$: $(1,-1)$ and $(-1,1): 2$
- $n=4$: $8$
- $n=6$: ...
Is there a general formula?
Number of ways of obtaining $0$ by summing only $1$ and $-1$ in ordered manner: Let $n$ represent the number of terms
Is there a general formula?
Copyright © 2021 JogjaFile Inc.
The number of terms must be even, so it’s more convenient to let $a_n$ be the number of such sequences with $2n$ terms. Clearly $n$ of the terms must be $1$ and the other $n$ must be $-1$, and they can occur in any order. Thus, there is one such sequence for each way of choosing $n$ of the $2n$ positions to be filled with $1$s. That number is simply the central binomial coefficient $\binom{2n}n$; for large $n$ this is approximately $\frac{4^n}{\sqrt{\pi n}}$.