No account? Create an account
 Adventures in EngineeringThe wanderings of a modern ronin.

 Date: 2008-11-22 01:57 Subject: The Collatz function and random meanderings thereupon. Public

We take any whole number N, greater than 0. If N is even, we halve it (N/2), else we do "triple plus one" and get 3N+1. Repeat. The conjecture is that for all numbers this process converges to 1.

http://en.wikipedia.org/wiki/Collatz_conjecture

I don't like mathematical equations formulated with "if ... else ..." constructs. They're not amenable to algebraic manipulation. Let's reformulate the Collatz function as a sum:

f(n) = ((3n + 1) * n%2) + (n/2 * (1 - n%2))

How does this work? When n is even, n%2 will be zero, and the (3n + 1) half of the equation will become zero also. When n is odd, (1 - n%2) will be zero, and the n/2 half of the equation will become zero.

Now we can do algebra.

)

 Date: 2008-11-22 06:53 Subject: Carl Friedrech Gauss's parlor trick. Public Music: KMFDM - Get Out Of My Head
Runner-up Music: Consolidated - Brutal Equation

I tried to sleep tonite. I really did. But it's another one of those nights where my brain decided it would be fun to keep me wide freakin' awake. Oh, I'm sure the bottle of Mt. Dew at 8pm didn't help. But seriously, being kept awake 11 hours by that? Nope.

You know what's been going through my head all night, while I couldn't sleep? That story about Gauss. The one about how he blew the mind of his math teacher in grade school. Have you heard it? It's probably apocryphal, but it's a great story anyway. I think I first heard it from my high school calc teacher. While I couldn't sleep, I re-derived the math from the story in my head.

)

browse