While I was at work a while ago, I had to help facilitate a new hire class. If you don't know what that means, it's unimportant: the upshot of it is that I was bored and had free time and nothing to fill it with. So I started playing around with math. Specifically, I was analyzing TooL's Lateralus for just how far they went with the incorporation of the
Fibonacci Sequence into the lyrics (it's awesome, you should check it out if you don't know about it - both the song and the Fibonacci Sequence). Then I started playing around with golden spirals, specifically with making nested golden spirals from the hypotenuses (?) of the squares used in previous golden spiral formation. I have a diagram and it is fun, I'll prolly scan it in and add it later. Anyway, after that, I started looking for a relationship between that and
Pascal's Triangle. That didn't pan out, so I started looking for a relationship between either of those and the prime numbers. That also didn't pan out, so I started trying to design a prime number generator.
I really didn't know where to start, so I figured I'd at least look at ways to get rid of non-primes. After all, the primes are practically by definition the numbers that don't fit patterns, so eliminating all of the patterns seemed like a decent angle of attack. So I started writing a huge list of numbers and crossing off every multiple of every integer, starting with two, then three, then four, etc. Obviously, this leaves you only with prime numbers, even though it's quite time-consuming. What I discovered, though, was that you can save yourself a lot of work once you realize a rather interesting fact: the multiples of each prime number will eliminate all non-primes until the square of the next prime number. In other words, crossing off every multiple of 2 will eliminate all non-primes until 9, which is 32; crossing off all multiples of 3 will eliminate all non-primes until 25 (52); crossing off all multiples of 5 will eliminate all non-primes until 49 (72); crossing off all multiples of 7 will eliminate all non-primes until 121 (112); and so on and so forth. This is good information, because at higher numbers you save yourself a lot of unnecessary double-checking, and you also know you're done with a sequence once the square of the next prime is higher than your goal number - in other words, you only need to eliminate multiples of numbers up to seven (and only of it and the preceding primes) in order to find all the primes from one to 120 (because 112 is outside the sequence). I still wasn't able to design a prime number generator, though.
Cut to today: after talking with Stewart in the aftermath of Contemporary Western Moral Theories, I had to pee. So I walked down the hallway of Stevenson Hall's third floor, only to find that the bathroom was closed for cleaning. So I walk back to the stairwell, and I see a poster on the wall about prime numbers. "Oh, yeah," I thought, "I was trying to design a prime number generator. This could be useful information." One of the things on the poster was what is known as the
Sieve of Eratosthenes. Which is exactly the method I had come up with for eliminating all non-primes from a given series of numbers. Dammit. Had I not stayed and talked with Stewart, I would have taken the bus home after not needing to pee immediately. Had I not had to pee, I wouldn't have seen this poster (at least not tonight, but possibly not before it got taken down). Had the bathroom not been closed, I wouldn't have seen it on my way back to the stairwell (I would have gone out the other door to head home). Do you know what this means? Somebody had to get my idea, probably from Zach (the only other person I told), then make a damn time machine, and go back in time to tell this Eratosthenes guy! Son of a bitch!
Anyway, I saw some other interesting stuff on there, and I have more ideas now (though they need testing). For one, I think that two to the power of any prime number, plus or minus one, will yield a prime number. In other words, (2n ± 1 = p), where n and p are prime numbers. If true, not only will this generate prime numbers in fairly short order, it will generate prime numbers from prime numbers, so the "largest prime discovered" is simply the next one to raise two to the power of and add one, and we've got another prime. Also: if true, this will prove that there are infinite twin primes (which to my knowledge has not been proven yet), though it may not describe them all ("twin primes" are primes immediately adjacent to an even number; in other words, if both solutions to n in (2x ± 1 = n) are primes, then they are twin primes) simply because there are infinite primes. Unless all of this has been proven already, in which case I will be pissed that the math department has significantly outdated posters.