I am a Software Development Engineer in Test working for the Windows Sound team. You can contact me via email: mateer at microsoft dot com
Friend key: 28904932216450_59cd9d55374be03d8167d37c8ff4196b
If you've bowled, you know the arrangement of the bowling pins forms a triangle.
(Image courtesy of the International Pumpkin Federation.)
If you've played eight-ball, you know the arrangement of the fifteen billiard balls forms a triangle.
Ten, fifteen... what other numbers form a triangle? The common arrangement of nine-ball and ninepins doesn't count because it's a diamond, not a triangle.
You can start with ten and add five balls to make a triangle of fifteen... then add six more to make a triangle of 21... then seven more to make a triangle of 28... and so on, with this sequence:
..., 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231...
Start looking for patterns. What do you see? Nothing jumps out right away. Are there any primes? Ones that end in 0, 2, 4, 6, or 8 are obviously even and therefore not primes... ones that end in 5 are divisible by 5 and therefore not primes... the remaining ones fall due to specific cases (21 = 3 x 7; 91 = 7 x 13; 153 = 3 x 3 x 17; 171 = 3 x 3 x 19; 231 = 3 x 7 x 11...)
In fact, gosh darn it, it seems like none of these numbers are prime, no matter how far we extend that "..." on the right! Can this be a coincidence?
A few mental coruscations later I have an idea that it is not a coincidence... that triangular numbers, by there very nature, cannot be prime. In fact I'm even willing to call it a "proof." Here it is.
"Theorem": there are no triangular primes.
First we need to generate a formula for the triangular numbers. Note that if you take an n x (n + 1) rectangle and draw a zig-zag line like so, you get two triangles.
Each of these triangles is composed of n diagonals, the shortest of which is 1, and the longest of which is n. That is to say, each of the triangles is composed of tn squares. So we know that the total number of squares in the rectangle is 2tn.
But we also know that the total number of squares is the base times the height, or n(n + 1). This gives us 2tn = n(n + 1), or tn = n(n + 1)/2.
The next part of the "proof" breaks down into case analysis. n can be odd (as in the diagram, where n is 5) or even.
Case where n is even:
n is an even positive number. Therefore n/2 is a positive number (maybe odd, maybe even; doesn't matter.) tn can be written as (n/2)(n + 1), and is therefore not prime, since it has at least four factors: 1, n/2, n + 1, and tn.
Case where n is odd:
n is an odd positive number. Therefore n + 1 is an even positive number. Therefore (n + 1)/2 is a positive number (maybe odd, maybe even; doesn't matter.) tn can be written as (n)([n + 1]/2), and is therefore not prime, since it has at least four factors: 1, n, (n + 1)/2, and tn.
Note that the "proof" that tn is not prime inevitably concludes in a stronger result - that tn has at least four factors... not only is tn not prime, it can't even have as few as three factors. (Some numbers with three factors: 4, 9, 25, 49...)
Exercise: what kind of numbers have exactly three factors?
A beautiful proof. Perhaps the two cases can be elegantly folded together to normalize it a bit better. That is not a serious problem.
There is a serious problem.
The proof of our result is doomed.
Why?
Because the result does not hold! There is a triangular prime.
Exercise: find a triangular prime.
After having recovered from the shocking revelation that, our beautiful proof to the contrary, a triangular prime is so rude as to exist, a little self-examination is in order. What is wrong with the proof? This... and not the existence of triangular primes... is the lesson to be learned: that beauty is not always truth.
vbBretty on the audio forums asked how to tell if a given audio output and a given audio input were on the same physical audio card.
I found the exercise interesting enough to share here:
Ah... Casablanca.
Arguably the best movie of all time. And yet a blown line? How could I be so bold?
The line:
Play it [As Time Goes By] again, Sam. -- Casablanca
Wow... that line, blown? Am I way off base here? Arguably the best line of arguably the best movie... blown? How so?
Well, for two reasons.
The topic of this arguably-best-line of the arguably-best-movie was thus saved by a haircut.