!header Pascal’s Triangle Colorings !begin-text-block Pascal’s Triangle is a commonly-seen construction that proves useful from time to time. We begin by drawing 1s down two sides of an equilateral triangle, and then fill in the rest of the triangle so that every number is the sum of the two above it. One interesting property of the resulting object can be seen by coloring the even numbers differently than the odd ones — this produces the Sierpinski Triangle. Now even and odd numbers are just those that have remainder 0 and 1 when divided by 2, respectively, so we can use more colors by looking at the remainders of division by larger numbers. In general, this works best when the number of colors is a power of a prime number (for example, 2, 7, 9, and 27, but not 6, 10, or 12), and the size of the triangle is a multiple of the number of colors. !wilson !end-text-block
!begin-text-boxes resolution 2000 Resolution triangle-size 27 Triangle Size num-colors 3 Colors !end-text-boxes !begin-text-buttons generate l Generate !end-text-buttons
!begin-text-buttons download l Download !end-text-buttons