 |
Author |
Topic: prime numbers (Read 1124 times) |
|
amoeba
|
prime numbers
« on: Aug 18th, 2004, 12:19am » |
|
Primary number geeks can now buy this poster, which shows all the digits of the largest prime number known as of May 2004. The number is 7.2 million digits long, is printed in 1 point type size on the poster and is best read with a watchmaker's loupe. Information? Visualization? I don't know... PS. If anyone wants lists of prime numbers, one source is this page by John Moyer. It has a form where you can request number ranges. Turns out my year of birth (1973) is a prime. Life is full of surprises.
|
« Last Edit: Aug 18th, 2004, 12:21am by amoeba » |
|
marius watz // amoeba http://processing.unlekker.net/
|
|
|
amoeba
|
Re: prime numbers
« Reply #1 on: Aug 18th, 2004, 11:09pm » |
|
Some simple code to generate smaller prime numbers (based on the code found here): Code:int [] primes = new int[1000]; //primes to check against int index, num=0; //num = number of primes saved int cnt,test; void setup() { primes[0]=3; // initial prime test=5; // first number to test } void loop() { boolean check; if(test<(primes[num]*primes[num])) { cnt=0; check=true; index=0; while(check==true && cnt<=num && test>=(primes[index]*primes[index])) { if(test%primes[index] == 0) check=false; else index++; } if(check) { //found prime println(test); if(num<(primes.length-1)) primes[++num]=test; //save prime } test+=2; } } |
| I'm currently working on a good solution for generating good invariant number sequences that evolve smoothly over time. Primes come in handy to calibrate sequence lengths to avoid overlap. It's like what computer musicians used to do in the 60s. They would make pieces consisting of playing multiple tapes with durations that were primes, so that the total piece would theoretically have to play for centuries before repeating itself.
|
marius watz // amoeba http://processing.unlekker.net/
|
|
|
|