Pascal's Triangle
Pascal's triangle is a geometric arrangement of the binomial coefficients in a triangle
$$
\begin{array}{ccccc}
& &1&&\\
& 1 & & 1&\\
1 && 2 && 2
\end{array}
$$
Details
\begin{tabular}{rccp{0.3cm}p{0.2cm}cccc}
$n=0$: & & & & &1\\\noalign{\smallskip\smallskip}
$n=1$: & & & &1& &1\\\noalign{\smallskip\smallskip}
$n=2$: & & &1& &2& &1\\\noalign{\smallskip\smallskip}
$n=3$: & &1& &3& &3& &1\\\noalign{\smallskip\smallskip}
\end{tabular}
To build Pascal's triangle, start with "1" at the top, and then continue placing numbers below it in a triangular pattern. Each number is just the two numbers above it added together (except for the edges, which are all "1").
Examples
\begin{xmpl}
The following function in R gives you the Pascal's triangle for $n= 0$ to $n=10$.
\begin{lstlisting}
fN <- function(n) formatC(n, width=2)
for (n in 0:10) {
cat(fN(n),":", fN(choose(n, k = -2:max(3, n+2))))
cat("\n")
}
\end{lstlisting}
\begin{verbatim}
0 : 0 0 1 0 0 0
1 : 0 0 1 1 0 0
2 : 0 0 1 2 1 0 0
3 : 0 0 1 3 3 1 0 0
4 : 0 0 1 4 6 4 1 0 0
5 : 0 0 1 5 10 10 5 1 0 0
6 : 0 0 1 6 15 20 15 6 1 0 0
7 : 0 0 1 7 21 35 35 21 7 1 0 0
8 : 0 0 1 8 28 56 70 56 28 8 1 0 0
9 : 0 0 1 9 36 84 126 126 84 36 9 1 0 0
10 : 0 0 1 10 45 120 210 252 210 120 45 10 1 0 0
\end{verbatim}
Changing the numbers in the line $\verb|for(n in 0:10)|$ will give different portions of the triangle.
\end{xmpl}