I drink a lot of Diet Mountain Dew. I drink an amazingly large, unhealthy, downright disgusting amount of Diet Mountain Dew. It’s a bad habit (and an expensive habit), but there you go.
For reasons that I can’t entirely understand, I’ve started building a little two-dimensional pyramid out of the 20oz bottle caps. It’s a monument to my decadence and consumerism, I guess.
The other day, I started wondering how many bottle caps were actually in the pyramid. And sure, I could just count them: but the math-minor in my thought that it would be trivial to figure out. This is where the story gets a little embarrassing.
I couldn’t do it. The best I could do was write a recursive algorithm to produce the count; and while that may be fine for a computer, it wouldn’t be any more fun for me than just counting the things. Since my math chops weren’t up to the task, I turned to technology.
I built a table with a few (Height, Count) values like (0, 0), (1, 1), (2, 3), (3, 6), etc. I actually used the recursive function I came up with and wrote a little C program to make the table for me so I could easily have one with about a hundred values or so. I then put the numbers into Excel and graphed them as a scatter plot. Using Excel’s “Add Trendline” function, I got an equation for the data that looked something like:
y = .50000000017x^2 + .50000000017x + 1E-19
I rounded this down and simplified it to .5(x^2+x). And this was great. It fit my data, but I couldn’t understand it. I tried and tried and couldn’t figure out why this would describe the number of bottle caps in my pyramid. Eventually I gave up and contented myself with proving that (x^2+x) will always be even and can therefore always be divided by 2 with no remainder. I thought I was done.
A few days later, though, I was adding yet another bottle cap to my pyramid of failure and I realized something that should have been immediately obvious from the start. Indeed, it’s so obvious that you have probably been wondering why I’m writing all of this down. And it’s this: every time you add a level to the pyramid, you add the same number of caps. In other words, when I add the 11th level to the pyramid, I’ve added 11 more caps to it.
So if my pyramid is 11 levels high, it has 11 + 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 caps in it. Wait a minute…that looks a lot like factorials, but with addition instead of multiplication. I spent a couple of minutes on Wikipedia and found that the addition equivalent of factorials is called…(wait for it)… triangular numbers.
And, it turns out, that the closed form of triangular numbers is (1/2)(n^2+n). It’s also (n+1)-choose-2 which I should have remembered from my days at college. Where I took a lot of math classes.
In conclusion: math is everywhere. It’s even sitting on my desk right now in the form of a pyramid of sadness (a triangular pyramid of sadness). Also: I’ve forgotten a lot about math and I’m just not very good at it anymore. It makes me wonder about all the time and energy I spent doing math homework. What was for? I know it was worth it, but right now, I can’t put words to that worth. Am I just fooling myself? Ah well. With the exception of my senior-level discrete math class, I really enjoyed it. If nothing else, that made it worthwhile.
Now, if you’ll excuse me, I’m going to use induction to prove that the closed form of triangular numbers really is (1/2)(n^2+n). Just to prove that I still know how.
January 31st, 2008 at 7:29 am
Brilliant! ..guess you’ve also proven you’re a true nerd ;)
January 31st, 2008 at 7:36 am
I can’t believe I read the whole thing! This further strengthens my disgust of mathematics. Expect a flaming bag of feces on your doorstep.
January 31st, 2008 at 9:37 am
I feel the same way about my fading math skills sometimes. Nice work puzzling all this out.
What this article really needs, though, is a picture of your pyramid.
January 31st, 2008 at 2:34 pm
I second that.. picture please!
February 11th, 2008 at 6:33 am
[...] bookmarks tagged bottle caps Brought To You By The Number: 3 saved by 5 others littleoinkster bookmarked on 02/11/08 | [...]