mersenneforum.org New Prime-Finding Algorithm Discovered! L00K HERE!
 Register FAQ Search Today's Posts Mark Forums Read

 2009-01-04, 07:58 #1 dilip_1bhowmik   22×971 Posts New Prime-Finding Algorithm Discovered! L00K HERE! Hi! guys , I wanna say something on PRIMES . I have found an Algorithm , which can create an endless list , I mean an infinite list of prime numbers . Not a prank friends, I really mean it . Can anyone tell me how to publish the same in GIMPS?
2009-01-05, 05:43   #2
Uncwilly
6809 > 6502

"""""""""""""""""""
Aug 2003
101×103 Posts

23×1,171 Posts

Quote:
 Originally Posted by dilip_1bhowmik Hi! guys , I wanna say something on PRIMES . I have found an Algorithm , which can create an endless list , I mean an infinite list of prime numbers . Not a prank friends, I really mean it . Can anyone tell me how to publish the same in GIMPS?

 2009-01-05, 18:21 #3 R. Gerbicz     "Robert Gerbicz" Oct 2005 Hungary 22×192 Posts found this funny pic: Attached Thumbnails
2009-01-05, 19:13   #4
CRGreathouse

Aug 2006

175616 Posts

Quote:
 Originally Posted by dilip_1bhowmik Hi! guys , I wanna say something on PRIMES . I have found an Algorithm , which can create an endless list , I mean an infinite list of prime numbers .
I have one too:
Code:
infinite_list_of_primes=[];
for(n=2, infinity,
factorial = prod(k=1, n - 1, k);
if (factorial % n == n - 1,
infinite_list_of_primes = concat(infinite_list_of_primes, n);
);
);
It takes only O(n^3 log n) operations to find the first pi(n) primes!

Last fiddled with by CRGreathouse on 2009-01-05 at 19:16

2009-01-05, 19:35   #5
ewmayer
2ω=0

Sep 2002
República de California

3×53×73 Posts

Quote:
 Originally Posted by CRGreathouse I have one too: Code: infinite_list_of_primes=[]; for(n=2, infinity, factorial = prod(k=1, n - 1, k); if (factorial % n == n - 1, infinite_list_of_primes = concat(infinite_list_of_primes, n); ); ); It takes only O(n^3 log n) operations to find the first pi(n) primes!
Oh sure, but Mr. Blowfly's superDuper soon-to-be-unpublished prime-finding algo can find them all - all infinity of them - in finite time. Beat that, Mr. My-House-Is-So-Huge-It-Puts-Yours-To-Shame.

Now, if you managed to get your own algo's work estimate down to a more-manageable O(oo3 log log oo), I might be more impressed...

 2009-01-05, 20:26 #6 CRGreathouse     Aug 2006 2·29·103 Posts Here's an optimization: Code: infinite_list_of_primes=[2]; for(n=3, infinity, factorial = 6 * prod(k=4, n - 1, k); if (factorial % n == n - 1, infinite_list_of_primes = concat(infinite_list_of_primes, n); ); ); This saves one iteration, plus two multiplications per iteration!
2009-01-06, 14:01   #7
10metreh

Nov 2008

2×33×43 Posts

Quote:
 Originally Posted by dilip_1bhowmik Hi! guys , I wanna say something on PRIMES . I have found an Algorithm , which can create an endless list , I mean an infinite list of prime numbers . Not a prank friends, I really mean it . Can anyone tell me how to publish the same in GIMPS?
Well, if you do the Sieve of Eratosthenes for eternity, you will get an infinitely long list of prime numbers.

2009-01-06, 14:46   #8
CRGreathouse

Aug 2006

2·29·103 Posts

Quote:
 Originally Posted by 10metreh Well, if you do the Sieve of Eratosthenes for eternity, you will get an infinitely long list of prime numbers.
Yeah, but can you get the SoE published in GIMPS?

2009-01-06, 16:34   #9
10metreh

Nov 2008

2·33·43 Posts

Quote:
 Originally Posted by CRGreathouse Yeah, but can you get the SoE published in GIMPS?
It was only a joke.

2009-01-06, 17:05   #10
akruppa

"Nancy"
Aug 2002
Alexandria

9A316 Posts

Quote:
 Originally Posted by CRGreathouse It takes only O(n^3 log n) operations to find the first pi(n) primes!
My code finds all primes too!!!!11!

Code:
unsigned long
nthprime(unsigned long n)
{
unsigned long i = 1, p = 2;
while (1)
{
while (i < n && p % nthprime(i) != 0UL)
i++;
if (i == n)
return p;
p++; i = 1;
}
}
Alex

2009-01-06, 18:08   #11
CRGreathouse

Aug 2006

2·29·103 Posts

Quote:
 Originally Posted by akruppa My code finds all primes too!!!!11!
Truly, I take off my hat for your accomplishment. Is this actually a proof that PRIMES is in EXP? Possibly even E?

Last fiddled with by CRGreathouse on 2009-01-06 at 18:09

 Similar Threads Thread Thread Starter Forum Replies Last Post marouane Computer Science & Computational Number Theory 18 2017-11-06 15:41 devarajkandadai Software 0 2017-07-11 05:42 T.Rex Miscellaneous Math 10 2015-09-01 18:07 T.Rex Miscellaneous Math 13 2015-09-01 13:09 T.Rex Miscellaneous Math 16 2015-08-31 02:32

All times are UTC. The time now is 04:05.

Thu Mar 4 04:05:44 UTC 2021 up 91 days, 17 mins, 1 user, load averages: 3.07, 2.08, 1.67