I am interested in creating Pascal's triangle as in this answer for N=6, but add the general (2n)-th row showing the first binomial coefficient, then dots, then the 3 middle binomial coefficients, then dots, then the last one.

Is this possible? I am very new to tikz and therefore happy to receive any kind of tip to solve this. Thank you!


Welcome! This is to give you a start.

  pascal node/.style={font=\footnotesize}, 
  row node/.style={font=\footnotesize, anchor=west, shift=(180:1)},
  Dotted/.style={% https://tex.stackexchange.com/a/52856/194703
  dash pattern=on 0.1\pgflinewidth off #1\pgflinewidth,line cap=round,
  shorten >=2pt,shorten <=2pt,line width=1pt},
    foreach \n in {0,...,\NPascal} { 
      (-\NPascal/2-1-\offset, -\n) node (rn-\n) [row node/.try]{Row \n:}
        \foreach \k in {0,...,\n}{
          (-\n/2+\k,-\n) node (pn-\n-\k) [pascal node/.try] {%
    (-\NPascal/2-1-\offset, -\NPascal-2) node (rn-N) [row node/.try]{Row $2n$:}
    (-\NPascal/2-1, -\NPascal-2) node (pn-N-0) [pascal node/.try] {$\binom{2n}{0}$}
    (\NPascal/2+1, -\NPascal-2) node (pn-N-N) [pascal node/.try] {$\binom{2n}{2n}$}
    (rn-\NPascal) edge[Dotted] (rn-N.north-|rn-\NPascal)
    (pn-\NPascal-0) edge[Dotted] (pn-N-0) 
    (pn-\NPascal-\NPascal) edge[Dotted] (pn-N-N)
    (pn-N-N) edge[Dotted] (pn-N-0);

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.