• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: >>> Prime Number Generator  (Read 3134 times)
swharden
Newbie
*

Karma: 1
Posts: 3


View Profile
« on: July 20, 2010, 11:48:03 PM »

Super-geeky, super-cool application for this plug.  To make a long story short, the only website which lets you look-up large N'th prime numbers (i.e., "What is the one-billionth prime number?") is http://primes.utm.edu/nthprime/index.php#nth but it only looks up to n=10^12 (one trillion).  To do it, they used a server farm to generate a map of prime numbers (there's no formula to generate prime numbers, you have to test every number to see if it's prime and count them as you go).  To replicate it (and exceed their 1 trillion limitation), I decided to write code to generate prime numbers and log them as they're discovered.  This code has been running for about 9 months on my SheevaPlug, with a cool web interface served directly from the plug.  It's already at n=914 billion (awesome!) and once it gets to a trillion, I'll enable the form at the bottom so you can look up individual prime numbers while it keeps crunching numbers exceeding that 1 trillion limit.

Amazing - a single plug computer has done with it took a server farm of 200+ computers to do! (I'm cheating a bit - he only had 24 hours' access to the server farm, I have as long as I want - but come on! it's a plug computer!)

PROJECT PAGE (SERVED FROM PLUG COMPUTER):
http://swharden.dyndns.org:8081/





« Last Edit: July 20, 2010, 11:57:20 PM by swharden » Logged

Rabeeh Khoury
Administrator
Full Member
*****

Karma: 5
Posts: 218


View Profile
« Reply #1 on: July 21, 2010, 02:16:13 AM »

WOW.

But the dyndns site is inaccessible, it endlessly tries to connect to the plug.

Anyhow, great work.
Logged

swharden
Newbie
*

Karma: 1
Posts: 3


View Profile
« Reply #2 on: July 21, 2010, 07:04:50 AM »

Thanks for letting me know!  I fixed the issue (router).
http://swharden.dyndns.org:8081/
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 440


View Profile WWW
« Reply #3 on: July 21, 2010, 04:05:32 PM »

It's already at n=914 billion (awesome!)
Have you checked them all against the original?  Tongue
Logged

swharden
Newbie
*

Karma: 1
Posts: 3


View Profile
« Reply #4 on: July 21, 2010, 08:20:15 PM »

Of course - that's what the yellow "CHECK" link right beside the most recently identified n/v pair is for!  Once it gets to 1 trillion there is nothing (on the web) to check it against though, but I'll take my chances and assume if I got the first trillion right, it's probably accurate ^_-
Logged

Pages: [1]
Print
Jump to: