[Math] Finding Value of Pascal’s Triangle Given Single Index

binomial-coefficientscombinatorics

I know that you can find the value of any number in Pascal's Triangle using the row and column with binomial coefficients, but cannot find a method to find the value given an index.

For instance, a Pascal's Triangle with 5 rows looks like:
\begin{gather}
1\\
1 \quad 1\\
1 \quad 2 \quad 1\\
1 \quad 3 \quad 3 \quad 1\\
1 \quad 4 \quad 6 \quad 4 \quad 1
\end{gather}

If you were to index this triangle, it would look like this:
\begin{gather}
00\\
01 \quad 02\\
03 \quad 04 \quad 05\\
06 \quad 07 \quad 08 \quad 09\\
10 \quad 11 \quad 12 \quad 13 \quad 14
\end{gather}

Without using previous values or referencing the row and column, can you find the value at any given index?

Best Answer

If you do not want to use the row number explicitly from the position index $i$ then you can use the inefficient $$\frac{\Big\lfloor \dfrac{\sqrt{8i+1}-1}{2}\Big\rfloor!}{\left(i-\dfrac{\big\lfloor \frac{\sqrt{8i+1}-1}{2}\big\rfloor\big\lfloor \frac{\sqrt{8i+1}+1}{2}\big\rfloor}{2}\right)!\left(\Big\lfloor \dfrac{\sqrt{8i+1}-1}{2}\Big\rfloor+\dfrac{\big\lfloor \frac{\sqrt{8i+1}-1}{2}\big\rfloor\big\lfloor \frac{\sqrt{8i+1}+1}{2}\big\rfloor}{2}-i\right)!}$$

That is just a substituted version of a more efficient method of finding the row $r=\Big\lfloor \dfrac{\sqrt{8i+1}-1}{2}\Big\rfloor$ using the floor function and and the value of the index of the initial position in the row $s=\dfrac{r(r+1)}{2}$, so the value corresponding to index position $i$ is $\displaystyle {r\choose i-s}=\dfrac{r!}{(i-s)!(r+s-i)!}$

Related Question