# Pascal Triangle Applet

This applet graphically presents the Pascal triangle modulo an integer number p, i.e. it computes the binomial coefficients  mod p and then plots them. The zero (mod p) values are depicted by gray dots, the non-zero values- by black dots. I shall call the resulting figure the "Pascal gasket of order p". If you try out my applet, you will see that if p=2 then the resulting picture is the Sierpinski gasket. It is a fractal of dimension less than 2, so its area (two-dimensional Hausdorff measure) is zero. This shows that in a certain sense almost all binomial coefficients are even. Actually (D.Singmaster, Notes on binomial coefficients III-- Any integer divides almost all binomial coefficients, J. London Math. Soc. 8 (1974), 555-560) same is true for every integer p>1. This means in particular that the area of every Pascal gasket is zero, though you can't quite see it from the picture, say, for p = 15000!

For more information see: Ian Stewart, Four Encounters with Sierpinski's Gasket. The Mathematical Intelligencer 17 (1995), 52-64 or Andrew Granville The Arithmetic Properties of Binomial Coefficients.

### How to use the applet

1. Enter the value of the modulus p you want. This may be any integer between 2 and 15000. You might get very interesting pictures for quite big values of p. Try, 1001, for example. You will be surprised!
2. Enter the number of rows. This is the number of rows in the triangles that the program will compute and plot for you. I limited it by 650 since that seemed to be the limit for my computer (486DX4-100, 16MB).
3. Click on "SHOW" and enjoy the image. Be patient: Java the way it is now is pretty slow!
If you have a slow system and choose a big number of rows, it might take for a while for the program to build the image. Be patient: the program writes "Calculating ... please wait!" in the status line while it is preparing the image. It should type "Done." when the image is ready (of course you will see the image also). If "Calculating..." disappears, but "Done" does not come up, it probably means that your computer can not handle the number of rows you entered. Try to decrease it. (I will try to make it more straightforward in a future release). You need to use the scrollbars to navigate through the image. If you scroll it very fast, the image may get corrupted. If you scroll it back and forward again, it will restore.

### The applet

You

Last updated on 07 March, 1999