Mike's Place
Never tickle a sleeping dragon.
Thursday, March 13, 2008
Happy Numbers
There are happy words -- usually colorful metaphors used to describe someone who has pissed you off.
Then there are happy numbers -- numbers in which you repeatedly sum the squares of the digits, until you've reduced the number to 1.
I first learned of happy numbers from Doctor Who. Martha Jones was trying to get through a series of locked doors, with each door looking for the answer to a riddle as a password. "What number is next in this sequence: 313, 331, 367?" Martha didn't know, so asked The Doctor over the com, causing The Doctor to comment on the lack of recreational mathematics in human education.
The answer? 379. Here's how to calculate a happy number...
Separate the number into its digits, square them, and add them. Repeat the process for the result, until you reach 1. If at any point the result repeats a previous number in the sequence, it isn't happy. Using 379 as an example...
379 -> 9 + 49 + 81 = 139
139 -> 1 + 9 + 81 = 91
91 -> 81 + 1 = 82
82 -> 64 + 4 = 68
68 -> 36 + 64 = 100
100 -> 1 + 0 + 0 = 1
So, 379 is a happy number (or in this case, a happy prime).
The name of the Doctor who episode was 42, which is significant in it's own right, being the ultimate answer to the great question of life, the universe, and everything. Sadly, though, 42 is not a happy number. It does have another interesting characteristic, however, in that it demonstrates its unhappiness be repeating itself...
42 -> 16 + 4 = 20
20 -> 4 + 0 = 4
4 -> 16
16 -> 1 + 36 = 37
37 -> 9 + 49 = 58
58 -> 25 + 64 = 89
89 -> 64 + 81 = 145
145 -> 1 + 16 + 25 = 42
Then there are happy numbers -- numbers in which you repeatedly sum the squares of the digits, until you've reduced the number to 1.
I first learned of happy numbers from Doctor Who. Martha Jones was trying to get through a series of locked doors, with each door looking for the answer to a riddle as a password. "What number is next in this sequence: 313, 331, 367?" Martha didn't know, so asked The Doctor over the com, causing The Doctor to comment on the lack of recreational mathematics in human education.
The answer? 379. Here's how to calculate a happy number...
Separate the number into its digits, square them, and add them. Repeat the process for the result, until you reach 1. If at any point the result repeats a previous number in the sequence, it isn't happy. Using 379 as an example...
379 -> 9 + 49 + 81 = 139
139 -> 1 + 9 + 81 = 91
91 -> 81 + 1 = 82
82 -> 64 + 4 = 68
68 -> 36 + 64 = 100
100 -> 1 + 0 + 0 = 1
So, 379 is a happy number (or in this case, a happy prime).
The name of the Doctor who episode was 42, which is significant in it's own right, being the ultimate answer to the great question of life, the universe, and everything. Sadly, though, 42 is not a happy number. It does have another interesting characteristic, however, in that it demonstrates its unhappiness be repeating itself...
42 -> 16 + 4 = 20
20 -> 4 + 0 = 4
4 -> 16
16 -> 1 + 36 = 37
37 -> 9 + 49 = 58
58 -> 25 + 64 = 89
89 -> 64 + 81 = 145
145 -> 1 + 16 + 25 = 42
Labels: Doctor Who
Friday, July 20, 2007
The Face of Boe
I just finished watching the Gridlock episode of Doctor Who. Three episodes into Series 3, and I still miss Billie Piper who played the Doctor's previous companion, Rose. But the new companion, Martha, looks like she'll work out nicely. I was a bit worried the Runaway Bride might be the new companion, and was delighted at the end of the episode to learn she'd decided to return to London. :)
Anyway, Gridlock was a fantastic episode. Although, it was a bit sad that the Face of Boe died. For those who have no idea what I'm talking about. the Face of Boe is a billions-of-years-old alien who, like the Doctor, is the last of his kind. He'd appeared twice previously, once funding a viewing of the end of the Earth five billion years in the future, and again in a hospital on New Earth. At this time he claimed to be dying, but the Doctor's presence seems to have energized him, and he teleported away at the end of the episode.
In Gridlock we learn he's back on New Earth, powering the "Motorway" following the destruction of all human life on the planet. A new drug had mutated, and killed all humans on the surface. Sealing off the lower city, those on the Motorway were saved. But, they'd spent the previous 24 years stuck in the Motorway, in an endless traffic jam. He was aware of the Doctor's arrival, and sent his nurse, Novice Hain, to find him. Returning with the Doctor, they collectively managed to release those trapped in the Motorway, thus repopulating New Earth.
But in order to power the machinery needed to open the hatchways to the upper city, the Face of Boe had to expend his remaining life force, thus ending his life to save the lives of the remaining humans on the planet. In his final moments, he revealed to the Doctor a secret -- that he was not alone.
I'm not yet sure what this means, but am looking forward to the rest of the season.
Anyway, Gridlock was a fantastic episode. Although, it was a bit sad that the Face of Boe died. For those who have no idea what I'm talking about. the Face of Boe is a billions-of-years-old alien who, like the Doctor, is the last of his kind. He'd appeared twice previously, once funding a viewing of the end of the Earth five billion years in the future, and again in a hospital on New Earth. At this time he claimed to be dying, but the Doctor's presence seems to have energized him, and he teleported away at the end of the episode.
In Gridlock we learn he's back on New Earth, powering the "Motorway" following the destruction of all human life on the planet. A new drug had mutated, and killed all humans on the surface. Sealing off the lower city, those on the Motorway were saved. But, they'd spent the previous 24 years stuck in the Motorway, in an endless traffic jam. He was aware of the Doctor's arrival, and sent his nurse, Novice Hain, to find him. Returning with the Doctor, they collectively managed to release those trapped in the Motorway, thus repopulating New Earth.
But in order to power the machinery needed to open the hatchways to the upper city, the Face of Boe had to expend his remaining life force, thus ending his life to save the lives of the remaining humans on the planet. In his final moments, he revealed to the Doctor a secret -- that he was not alone.
I'm not yet sure what this means, but am looking forward to the rest of the season.
Labels: Doctor Who
