so I spent an entire day staring at lists of prime numbers. seriously, the whole day. I guess I have issues. when I get into a project, I can become rather obsessive. I have a tendency to neglect all but main survival aspects of life until I can come to some conclusion, or finish whatever I'm working on. it's a certain mad scientist quality I guess.
I was hoping to find some pattern, or some way of organizing prime numbers in a way that could be useful for programming. specifically, I wanted to use prime numbers help be represent large numbers, for reasons I'll discuss later. my theory was that it might be more efficient to represent numbers as lists of primes, and describe primes by their position on the number line. here's an example. 8 is 2^3. 2 is the first prime number. so we can describe 8 by saying 1^3, because 8 is the first prime number cubed. 20 is 4 * 5, and 4 breaks down to 2 squared. so 20 could be written 1^2 3^1, which means that the first prime number (2) goes into into it twice, and the third prime number (5) goes into it once. it would remain to be seen if this model would actually be useful in reducing the size of large numbers. it may end up taking more bytes in the long run.
for this to work, of course, I'd need a quick and easy way to determine what numbers are prime and what factors composite numbers have. granted, if I could figure that out, I would probably win a prize of some sort, as no one's done it yet..
another theory was that I could use a multidimensional array to count prime numbers up from 1. it seemed to work in concept. basically you just create another dimension for each new prime number. my hope was that there would be some kind of multidimensional spiral right down the middle of gooey creamy uninterrupted prime numbers.
I did find a few patterns... some of them were interesting. nothing that's going to win me the nobel prize though. in the end I just had to give up and spend time with my girlfriend. such is the life of a mad scientist.
Thursday, April 2, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment