Monthly Archives: October 2006

Multi-dimensional Pyramidal Numbers

Fruit PyramidI was walking through main suite of the mathematics offices and glanced over at the board where some students, who I believe are in a mathematics education course, were working on calculating the sum of the first few triangular numbers.

For those of you that don’t know, triangular numbers are the numbers that represent the sum of the first [tex]n[/tex] positive integers

[tex]1 = 1[/tex]
[tex]1+2 = 3[/tex]
[tex]1+2+3 = 6[/tex]

It might be easier to see why they are referred to as triangular if you look at the table below:

1     O
3 O  O
6 O  O  O
10 O  O  O  O
15 O  O  O  O  O
21 O  O  O  O  O  O

The number in each row represents the number of “balls” on the row and all previous rows. Note that if you want the [tex]n[/tex]th triangular number, you can see that

[tex]T_n = displaystyle frac{n(n+1)}{2}[/tex]

(You can prove this by a standard mathematical induction argument)

So the question was, “What is the sum of the first [tex]n[/tex] triangular numbers?”

[tex]T_1 + T_2 + T_3 + cdots + T_n[/tex]

Another way of looking at this question is to see it as the number of balls in a triangular pyramid. They are called either tetrahedral numbers or pyramidal numbers.

[tex]1 = 1[/tex]
[tex]1+3 = 4[/tex]
[tex]1+3+6 = 10[/tex]

It can be shown that [tex]displaystyle P_n = frac{n(n+1)(n+2)}{6}[/tex], where [tex]P_n[/tex] denotes the [tex]n[/tex]-th pyramidal number. Again, this is a straight-forward exercise to prove this by mathematical induction.

This inspired me to double check that adding the first [tex]n[/tex] pyramidal numbers would follow this pattern. I’ll spare you the my lengthy version of this mathematical induction proof (that is, unless you ask).

[tex]displaystyle P_1 + P_2 + P_3 + cdots + P_n = frac{n(n+1)(n+2)(n+3)}{4!}[/tex]

Now, I’ve not really seen this in any of my reading or course work. Someone reading this might know if such numbers have a name but for lack of a better one, I’ll call them “hyper-pyramidal numbers” which basically represent the number of balls it would take to form a 4-dimensional triangular pyramid. We can then extend this generalization to any dimension. You’ve seen the 3-D pyramid in the image above. Now imagine extending a triangular pyramid in some new dimension. That is, we really have a sequence of 3-D pyramids of shrinking size. Just like the 3-D pyramid is a sequence of triangles of shrinking size. If we are dealing with a [tex]4[/tex] dimensional hyper-pyramid, then the first 3-D pyramid would be [tex]n[/tex] rows high. This would have [tex]T_n[/tex] balls. Then the next would be [tex]T_{n-1}[/tex] balls and so one down to a single ball. Then the total number would be

[tex]displaystyle P_1 + P_2 + P_3 + cdots + P_n = frac{n(n+1)(n+2)(n+3)}{4!}[/tex]

For simplicity let me modify my notation so that [tex]P_n^{(k)}[/tex] represents the [tex]n[/tex]-th [tex]k[/tex]-D hyper pyramidal number. Thus my notation would say,

[tex]P_n^{(1)} = n[/tex]
[tex]displaystyle P_n^{(2)} = T_n = frac{n(n+1)}{2}[/tex]
[tex]displaystyle P_n^{(3)} = P_n = frac{n(n+1)(n+2)}{3!}[/tex]
[tex]displaystyle P_n^{(4)} = P_1 + P_2 + cdots + P_nfrac{n(n+1)(n+2)(n+3)}{4!}[/tex]
[tex]displaystyle vdots[/tex]
[tex]displaystyle begin{array}{rl}P_n^{(k)} &= P_1^{(k-1)} + P_2^{(k-1)} + cdots + P_n^{(k-1)}\[2ex] &= displaystyle frac{n(n+1)(n+2)cdots(n+k-1)}{k!}end{array}[/tex]

Unfortunately, I did not take the time to verify the general formula for [tex]P_n^{(k)}[/tex] by induction on [tex]k in mathbb{Z}^{+}[/tex]. I do have other things to do you know. Give it a shot if you’re ever bored.

Google Browser Sync

A while back, I started using the site,, for my bookmarks. My primary reason for doing so was so that I would have access to my bookmarks from any of the multiple computers that I use. Way down on the list of reasons to use the delicious bookmarks were for the “social networking” aspect of letting others see what I link to. But if you are interested you can see my links here:

Google LabsBut now, I have a new toy!! Google Browser Sync. I love this thing. It is an extension to the firefox browser available from Google Lab which allows you sync your firefox browser across different computers.  It actually allows you to syncronize your cookies, bookmarks, history and even saved passwords.  It is configurable so that you can choose exactly which data is syncronized.  Personally, I had no desire to syncronize anything except my bookmarks.  There is also an option for encryption and there is a 4 digit PIN that must be chosen so that you can verify the identity of your other browsers.  I am pretty sure that you do need a Google Account to be able to use this tool.

powered by performancing firefox

Using LaTEX with Geometers Sketchpad

(By the way, the word LaTEX is pronounced as lay-tech or L-A-tech, and it is a typesetting language.)

I never have found a “great” tool for creating ideal graphics for my exams and worksheets for use in the classes that I teach. Ideally, there would be a program that would allow me to draw basic geometric shapes like triangles, quadrilaterals, regular and non-regular polygons, circles, ellipses, parabolas, hyperboles, general functions, three dimensional shapes and surfaces, etc. In most cases, a simple GUI would be preferred where I am able to “point-and-click” to create most of my images. Obviously in more intricate drawings I’d need an interface for graphing functions. Afterward, I’d like to be able to export the drawing into any format such as a png, jpeg, gif, tiff, wmf, emf, ps, or eps. I have always been able to create what I want by combining my skills from MS Paint, Maple, Matlab, Photoshop (which I no longer have access to), Macromedia Firefox, Paint Shop Pro (which I no longer have access to), MS Work, MS Publisher, Excel, or OpenGL in C++. I used some of the Department’s budget to buy Geometer’s Sketchpad a few years ago, but I never really learned to use it. Today, I decided to become at least a little more familiar with it and use it to create some simple drawings. I then wanted to import my graphics into a LaTEX document.

Below are the two procedures I used, since GSP does not allow an export directly to any format that I can use in LaTEX or pdfLaTEX.

1. Draw the image in Geometer’s Sketchpad. There’s a bit of a learning curve in this step but I am getting the gist of it.
Option I
2. Save the GSP object as a wmf (windows metafile)
3. Use GIMP (an open source, rough equivalent of Photoshop) and open the wmf file then save it as a jpeg image. It helped to “clean up” the graphic to create the wmf file as a large image (1000 x 1000 pixels) then resize to the smaller desired size (using cubic filter for resizing).
Option II
2. Do a screen capture in GSP (using ctrl-alt-PrintScreen to copy the active window to clipboard.
3. Open a new image in GIMP (big enough to contain the active window. I know that my screen resolution is no more than 1400×1050, so I use that.). Then paste.
4. Crop the portion of the this window containing my desired image.
5. Save this as a jpeg.



to insert the image in the LaTEX file. Note that you must have usepackage{graphicx} in the preamble of the LaTEX file.

powered by performancing firefox

Websites as graphs

I had a lot of fun a few years back preparing a module and a talk for a regional Mathematics and Science teachers conference at WTAMU.  In fact, this year was the first in several years that I did not prepare a talk for this particular conference.  I am already preparing one for next year on utilizing specific web 2.0 tools in the mathematics classroom.  The talk I mentioned above was on Graph Theory, which basically models the pairwise connectedness between objects from a certain set.  Of course it included as a launching point, one of the earliest results from graph theory, the Seven Bridges of Königsberg, which demonstrated that it was impossible to traverse a path that crossed all seven bridges without crossing any bridge twice.

I thought the applet below was a fairly neat application of graph theory, converting a website into a color coded graph.  Once you type in a website it will create the graph showing the aspects of the websites such as forms, tables, links, and other sorts of html tags.  They are presented as dots (vertices) with pairwise connections, thus creating a graph.  The specifics of the generation are unclear but it does have a nifty result.  I’ve played with it longer than a should have creating graphs for all of my websites.  This blog’s “graph” is pictured.

Websites As Graphs (you can enter the url of any website)

Graphify my blog

A couple of toys

  1. JediWPMConcentrate (Windows)
    If any of you read Lifehacker you saw this come up last week.  There was apparently a little “toy” application (WPM Tray) that would track your typing speed down in the system tray. It would display your current typing rate in words per minute. I’m not exactly sure what time span it averaged the rate over but I was surprised to learn that when I am typing these blogs I am in the 70-90 wpm range. That was quite a surprise. I remember in high school competing in the typing contest but I thought my skills as a typist had waned greatly over the years but apparently I have been playing around with this blog stuff that my typing rate is back up. Anyways, the application here is combined with an other app JediConcentrate (an application focus app). So what does this get you?

    Something really cool. Basically, once your typing speed passes a certain threshold (the default is 40wpm, but you can change it), every window but the one you’re typing in fades to black – the point being that once you hit a certain typing speed, JediWPMConcentrate acts as a sort of “bloodlust” mode for your typing and focus. Once you drop below the typing threshold, the background fades back to normal.

  2. Juice, the cross-platform podcast receiver
    Download Juice, the cross-platform podcast receiverWithin the last week, I started looking closer at using my IPAQ to download and listen to podcasts (or netcasts, as I prefer to call them, thanks to Leo Laporte). There are several out there that I have been wanting to listen to and had not really found an efficient way to put them both on my laptop and my Pocket PC. This is definitely the software I recommend for subscribing to podcasts on a desktop or laptop. However, since I also want this on my IPAQ, the feature I like most was the automatic playlist creation. I could open Windows Media Player after downloading the podcasts of my choice and there would be playlist that I could then sync to my IPAQ. Now, I know all you Apple people out there know that this is a streamlined process when using iTunes and an iPod, but I always do things the hard way, uh, I mean, the Microsoft way. Pure habit.
  3. FeederReader, podcatching software for the PocketPC
    I am very pleased with this utility that allows me to import my OPML file from Juice and while connected either through a sync cable, or via wireless, I can download my favorite podcasts directly to the IPAQ. Since this is almost exclusively where I want to listen to my podcasts I prefer to skip the middle man (Juice) and download straight to my IPAQ. This software, once I understood how to use it, worked perfectly for this. I can tell it exactly with podcasts to download, meaning that it doesn’t have to automatically download every single one that I am subscribed to every time I connect. I am addicted to tool tips in the windows interface so there was a learning curve with this software. Several of the buttons didn’t make sense to me as to what they did. I actually had to read the user’s manual, but once I did, it functioned perfectly.

Absent minded professor


I didn’t think I fit into the typical category of an absent minded professor. Perhaps those that know me will disagree. However, today, I proved myself wrong. I realized just a few minutes ago that I taught my entire Intermediate Algebra class with my sweater vest on inside out.

I blame it on Christopher Columbus! (Emily is out from school today, so I didn’t have to get up as early, so I overslept and rushed out the door this morning)

Monday’s Problem

I thought I’d throw out a simple little problem that intrigued me and led me off on a wild goose chase. In the end, I got almost none of my intended work done before class, while I was exploring all sorts of problems of perimeters of overlapping figures.


Pairs of identical rectanglular strips, each measuring 3 by 1, are overlapped in a number of different ways to form three different shapes, shown in the diagram below.


Which shape has the greatest perimeter?

I accept that this is really not that difficult of a problem but the question that got me distracted was the last of the following: What if the dimensions of the rectangles were 5 by 2? 9 by 7? a by b?
What if the rectangles do not overlap at right angles?