Even Powers and Odd Numbers

This is a very simple mathematical relationship I found out about recently, which I rather like (although I don’t claim to be original… it’s probably been covered millions of times before!). Here’s an example:

12 = 1
22 = 4 = 1 + 3
32 = 9 = 1 + 3 + 5
42 = 16 = 1 + 3 + 5 + 7
52 = 25 = 1 + 3 + 5 + 7 + 9

You’ll notice that the square numbers are being formed by sums of consecutive odd numbers, starting at 1. I don’t have a mathematical proof for this (although I’m sure one exists), but it appears to work for any even power. I wrote a quick computer program to try the same with the 10th power, and sure enough, it works:
Read the rest of this entry »


Working with COM and DirectShow

I’m doing some work with webcams just now, and in the pursuit of efficiency, I am turning to DirectShow — that is, the part of Microsoft’s DirectX which handles things like videos and webcams. Surprisingly, I have hardly used DirectX at all before, except briefly in 1st year as an undergrad, so it’s fairly new ground for me. However, I quickly found that it really is well worth spending time getting familiar with the technology, as it can be amazingly useful.

Read the rest of this entry »


BlackBerry Curve 8900

As of a couple of days ago, I am the proud owner of a snazzy new BlackBerry Curve 8900, on a rather nicely dicounted O2 tariff (thanks again Thomas!). I have had a good chance to play around with it, tweaking settings and so on, and suffice it to say, the experience is rather different compared to my previous second-or-third-hand phones on pay-as-you-go tariffs!

I’m going to write a fairly in-depth review based on what I think is important about this mobile phone. Apologies if I miss what may seem important to you. Feel free to post a comment though if you’d like to know more!

Read the rest of this entry »