Referencing an external resource...

topic posted Sun, February 26, 2006 - 3:27 AM by  Edward
Okay...

I have a function that determines whether or not a number is prime. Basically, you give it a number and it checks a big table of known primes and then it checks a few division tricks and then it checks to see if any of the numbers in the prime table divide it.

Of course, if it finds the number in the table, it immediately kicks back a TRUE.

The more tricky the number, the longer it takes to find. The final stages is that it just basically goes through brute force division to determine.

My table-of-primes is a table that contains the first 10,000 primes. However...

There are plenty of web pages and online resources that have long lists of primes.

Using only JavaScript, is there a way I can access some list out there. For example, my first thought was to find a list page and open it in a JS window and parse the code into an array.

But off the top of my head, I'm not sure if this is possible.

Suggestions? Ideas?
posted by:
Edward