The Pascal triangle for binomial coefficients starts with 1
in line 1 and goes on with 1 1
in line 2, 1 2 1
in line 3, and so on.
The answers to this question
show how one may write up solutions in tikz.
Here is the adapted version which I prefer:
\begin{tikzpicture}[rotate=-90]
\foreach \x in {0,1,...,3}
{
\foreach \y in {0,...,\x}
{
\pgfmathsetmacro\binom{factorial(\x)/(factorial(\y)*factorial(\x-\y))}
\pgfmathsetmacro\shift{\x/2}
\node[xshift=-\shift cm] at (\x,\y) {\pgfmathprintnumber\binom};
}
}
\end{tikzpicture}
How do I write up a variant which has 0
in the first line, 1
in the second line, 1 1
in the third line and thereafter goes on as the usual Pascal's triangle?