20090104, 07:58  #1 
2^{2}×971 Posts 
New PrimeFinding 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?

20090105, 05:43  #2  
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
2^{3}×1,171 Posts 
Quote:


20090105, 18:21  #3 
"Robert Gerbicz"
Oct 2005
Hungary
2^{2}×19^{2} Posts 
found this funny pic:

20090105, 19:13  #4  
Aug 2006
1756_{16} Posts 
Quote:
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); ); ); Last fiddled with by CRGreathouse on 20090105 at 19:16 

20090105, 19:35  #5  
∂^{2}ω=0
Sep 2002
República de California
3×53×73 Posts 
Quote:
Now, if you managed to get your own algo's work estimate down to a moremanageable O(oo^{3} log log oo), I might be more impressed... 

20090105, 20:26  #6 
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); ); ); 
20090106, 14:01  #7 
Nov 2008
2×3^{3}×43 Posts 
Well, if you do the Sieve of Eratosthenes for eternity, you will get an infinitely long list of prime numbers.

20090106, 14:46  #8 
Aug 2006
2·29·103 Posts 

20090106, 16:34  #9 
Nov 2008
2·3^{3}·43 Posts 

20090106, 17:05  #10  
"Nancy"
Aug 2002
Alexandria
9A3_{16} Posts 
Quote:
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; } } 

20090106, 18:08  #11 
Aug 2006
2·29·103 Posts 
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 20090106 at 18:09 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Endorsement Prime Numbers finding algorithm  marouane  Computer Science & Computational Number Theory  18  20171106 15:41 
parialgorithm for finding Gaussian integer bases  devarajkandadai  Software  0  20170711 05:42 
OEIS  (2^n5)/3  n odd  LLTlike algorithm for finding PRPs  T.Rex  Miscellaneous Math  10  20150901 18:07 
OEIS  2^n5  LLTlike algorithm for finding PRPs  T.Rex  Miscellaneous Math  13  20150901 13:09 
OEIS  A050414  2^n3  LLTlike algorithm for finding PRPs  T.Rex  Miscellaneous Math  16  20150831 02:32 