20210219, 10:36  #56  
Feb 2021
Salt Lake City, UT
29 Posts 
Quote:
Last fiddled with by mattprim on 20210219 at 11:24 

20210219, 10:50  #57 
Feb 2021
Salt Lake City, UT
29_{10} Posts 
Here is the PariGP code which is running more less the same fast (one night on 1.5 GHz) to check the same what which my Mathematica compiled code:
LL(p)={ my(m=Mod(4,1<<p1)); for(i=3,p,m=m^22); m==0 }; ? search()={ print("2^21"); forprime(p=3,43112609, if(LL(p), print("2^"p"1")) ) }; ? ? search() 2^21 2^31 2^51 2^71 2^131 2^171 2^191 2^311 2^611 2^891 2^1071 2^1271 2^5211 2^6071 2^12791 2^22031 2^22811 2^32171 2^42531 2^44231 2^96891 2^99411 2^112131 2^199371 2^217011 2^232091 2^444971 Last fiddled with by mattprim on 20210219 at 10:53 
20210219, 11:20  #58 
Sep 2002
Database er0rr
3·1,453 Posts 
Okay grasshopper, now implement modular reduction over Mp either in Pari/GP or MMA.
Then do some shallow trial division by 2*k*p+1. I expect this to speed up your codes by 20 fold. 
20210219, 11:33  #59 
Feb 2021
Salt Lake City, UT
29 Posts 
Sorry, I am only mathematician with PhD trying to do some research how to get 150 thousand dollars prize for 100 million digits prime. I actually believe there is some Fermat Last (Great) Theorem like theorem which Mersennes are primes stating like "The Mersenne number is the prime if and only if ... " i.e. its prime exponent fulfills some conditions which then I would call a superprime or prime prime. The theorem than would allow to simply construct the next larger Mersenne prime. For example: the Mersenne prime is the prime if and only its exponent Modulo division by all the lower primes is the prime. Or: The Mersenne prime is the prime if and only if its position in primes number factorization does not contain 13 etc. i.e. the result of the LL test can be predicted from it.
Last fiddled with by mattprim on 20210219 at 12:13 
20210219, 14:26  #60 
Feb 2021
Salt Lake City, UT
1D_{16} Posts 
The prove of LL test not getting out of the integer number space is comparatively easy for n=3 but it does not want go that way
easy for larger: let s = x^2 Then let s_1 = x^2*x^2  x = x^4  x = x*(x^31) = x (x1)(1+x+x^2) but from the geometric series 1+x+x^2 = (1x^3)/(1x) so s1 is devisable by (1x^3)/(1x) which for x=2 is exactly the Mersenne prime 2^31=7 But if you generate this polynomials in general higher not much can be done and seen that way. Simply gets worse than the normal Great Fermat theorem that some polynomial in x of 2p2 order for x integer is integerproportional to x^n1 only for n a certain prime and x=2. Last fiddled with by mattprim on 20210219 at 14:36 
20210219, 15:50  #61  
Aug 2006
5,987 Posts 
Quote:


20210219, 16:18  #62 
Undefined
"The unspeakable one"
Jun 2006
My evil lair
2^{4}·5·83 Posts 
This whole thread is pointless.
Mathematica is not the tool to use. Is it for general purpose, and not optimised for Mersenne primes. The OP is wasting time trying to use it. 
20210219, 16:54  #63  
Feb 2017
Nowhere
3^{2}·677 Posts 
Quote:
Fermat's "little theorem" is much more pertinent, leading to a simple explanation of the fact that if p is prime and q divides 2^{p}  1, then p divides q1. If you think there's a way to test whether the prime p is such that 2^{p}  1 is prime, which is significantly cheaper computationally than the methods currently known and used, I doubt you would be able to discover it by testing exponents in the known range. Mersenne himself thought he had a way of determining which exponents p gave prime values of 2^{p}  1. He didn't. Last fiddled with by Dr Sardonicus on 20210219 at 16:55 

20210219, 16:57  #64  
Aug 2006
5987_{10} Posts 
Quote:


20210219, 21:22  #65  
Feb 2021
Salt Lake City, UT
1D_{16} Posts 
Quote:
The prove of LL test not getting out of the integer number space is comparatively easy for n=3 but it does not want go that way easy for larger: let s_0 = x^2 Then let s_1 = x^2*x^2  x = x^4  x = x*(x^31) = x (x1)(1+x+x^2) but from the geometric series 1+x+x^2 = (1x^3)/(1x) so s1 is devisable by (1x^3)/(1x) which for x=2 is exactly the Mersenne prime 2^31=7 But if you generate this polynomials in general higher not much can be done and seen that way. Simply gets worse than the normal Great Fermat theorem that some polynomial in x of 2p2 order for x integer is integerproportional to x^n1 only for n a certain prime and x=2. Last fiddled with by mattprim on 20210219 at 21:39 

20210219, 21:26  #66 
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
10101000101111_{2} Posts 
Have you thought about programing LL up in Excel instead?

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Searching for m. primes is like playing lottery  joblack  Lounge  20  20090105 15:18 
to be faster at searching mersenne primes  flosculus  Information & Answers  6  20081110 18:59 
searching for Mersenne primes  davieddy  Math  7  20070821 04:51 
A Proposal for searching Recurrence Series Primes  Erasmus  Factoring  3  20040514 09:26 
Need help with math problem re: searching for all primes.  daxm  Miscellaneous Math  5  20030720 19:32 