Eyes!

June 14, 2011

I randomly made this thing out of boredom:

Cute, but it’s probably a sign that I need some better ideas for hobby programming projects xD

It uses the pyglet library, and is only a page or so of python code.


The hockey stick theorem: an animated proof

October 22, 2010

An interesting theorem related to Pascal’s triangle is the hockey stick theorem or the christmas stocking theorem. This theorem states that the sum of a diagonal in Pascal’s triangle is the element perpendicularly under it (image from Wolfram Mathworld):

So here the sum of the blue numbers , 1+4+10+20+35+56, is equal to the red number, 126. It is easy to see why it’s called the hockey stick theorem – the shape looks like a hockey stick!

An alternative, algebraic formulation of the hockey stick theorem is follows:

\displaystyle\sum_{i=0}^{k} \binom{n+1}{i} = \binom{n+k+1}{k}

But this works in two ways, considering the symmetry of Pascal’s triangle. The flipped version would be:

\displaystyle\sum_{i=0}^{k} \binom{n+1}{n} = \binom{n+k+1}{n+1}

Using Pascal’s identity, it is fairly trivial to prove either identity by induction. Instead I present an intuitive, animated version of the proof:


Follow

Get every new post delivered to your Inbox.

Join 72 other followers