mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2006-05-27, 16:52   #1
K Ramsey
 
May 2006

7 Posts
Default Re New test for Mersenne Primes

I wrote a basic program that tests for Mersenne primes based on my thread "Is This of any Merit" but havn't done the task of enhancing the speed of the program yet. This program weeded out all Mersenne primes from 3 up through p = 127 correctly and checked up to p = 409 in less than 6 hours.
Starting with all the primes in column 1 of an excel spread sheet the program checks each prime in sequence and prints a one beside each prime only if 2^(p) - 1 is prime. I should be able to double the speed by using such techniques as turning off screen display etc, but have to go now.

Last fiddled with by K Ramsey on 2006-05-27 at 17:23
K Ramsey is offline   Reply With Quote
Old 2006-05-28, 04:49   #2
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

2×4,027 Posts
Default

I fired up Dario's handy Java app. and feed it all odd exponent to 501 and it took it ~2 seconds to check all the numbers for primality.

That is 2^3-1, 2^5-1, 2^7-1,..... 2^499-1, 2^501-1

I could not find a L-L in BASIC, but, I suspect that it would kick some serious speed, FFT & DWT not included.

Last fiddled with by Uncwilly on 2006-05-28 at 04:51
Uncwilly is offline   Reply With Quote
Old 2006-05-28, 11:16   #3
K Ramsey
 
May 2006

78 Posts
Default

Quote:
Originally Posted by Uncwilly
I fired up Dario's handy Java app. and feed it all odd exponent to 501 and it took it ~2 seconds to check all the numbers for primality.

That is 2^3-1, 2^5-1, 2^7-1,..... 2^499-1, 2^501-1

I could not find a L-L in BASIC, but, I suspect that it would kick some serious speed, FFT & DWT not included.
I fed this program 2^4423 -1 and it took only about 5 seconds to print out all 1602 digits and that the number is prime! Is this really a good base mark to judge my program on?
I did improve the speed of my program a bit. It went through primes from 409 through 929 in less than 6.5 hours. I was afraid that it would take much longer so I put the numbers 521 and 607 ahead of 409 on my excel spread sheet last night to see if I didn't mess things up. I for got to remove them further down in the list so the program did these primes twice. About turning the screen update off to speed the program up, this might not applied to Excel 2003 as it was writen for Excel 97. This morning when I turned on my monitor nothing was showing beside 521 or 607 until I hit the escape button to exit the program. I was afraid at first that I screwed up and the program failed until the 1's showed up on the screen after I exited my program. I still have some improvements to make then I will trim down my program and export the module, delete it, and import it back into my workbook to see if that increases my speed. Of course all you experts out there may find this quite amusing. Are there really programs out there that can give the primeness of 2^4423 -1 on my Windows XP in less than 7 seconds without being based upon the predetermined fact of it?

Last fiddled with by K Ramsey on 2006-05-28 at 11:20
K Ramsey is offline   Reply With Quote
Old 2006-05-28, 11:52   #4
AntonVrba
 
AntonVrba's Avatar
 
Jun 2005

2×72 Posts
Default

Quote:
Originally Posted by K Ramsey
Are there really programs out there that can give the primeness of 2^4423 -1 on my Windows XP in less than 7 seconds without being based upon the predetermined fact of it?
YES
PFGW Version 1.2.0 for Windows [FFT v23.8]

Primality testing 2^4423-1 [N+1, Brillhart-Lehmer-Selfridge]

Running N+1 test using discriminant 3, base 1+sqrt(3)
2^4423-1 is prime! (0.1584s+0.0022s)

And 7 Seconds

PFGW Version 1.2.0 for Windows [FFT v23.8]

Primality testing 2^23209-1 [N+1, Brillhart-Lehmer-Selfridge]
Running N+1 test using discriminant 3, base 1+sqrt(3)
2^23209-1 is prime! (7.0036s+0.0025s)

Done.

Last fiddled with by AntonVrba on 2006-05-28 at 12:00
AntonVrba is offline   Reply With Quote
Old 2006-05-28, 13:04   #5
K Ramsey
 
May 2006

7 Posts
Default

Quote:
Originally Posted by AntonVrba
YES
PFGW Version 1.2.0 for Windows [FFT v23.8]
..
Primality testing 2^23209-1 [N+1, Brillhart-Lehmer-Selfridge]
Running N+1 test using discriminant 3, base 1+sqrt(3)
2^23209-1 is prime! (7.0036s+0.0025s)
Where do I get this program and is the code available so that I can study it?

Also since my test gives correct results for the first 162 primes excluding p=2 since 3 is a special case. Is it possible to use my conjecture and the other conjectures in this forum to give even quicker results?
K Ramsey is offline   Reply With Quote
Old 2006-05-28, 14:36   #6
fetofs
 
fetofs's Avatar
 
Aug 2005
Brazil

2·181 Posts
Default

Quote:
Originally Posted by K Ramsey
Where do I get this program and is the code available so that I can study it?
http://groups.yahoo.com/group/primeform/

The program is open-source
fetofs is offline   Reply With Quote
Old 2006-06-04, 09:45   #7
troels munkner
 
troels munkner's Avatar
 
May 2006

29 Posts
Default mersenne primes

Sorry, your technique will never work within a reasonable span of time.
If you look on Fermat's small theorem and know more about possible primes,
you can easily find Mersenne possible primes (which embrace real MP's
and Mersenne "products")


Y.s.
troels munkner is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mersenne Primes p which are in a set of twin primes is finite? carpetpool Miscellaneous Math 3 2017-08-10 13:47
Distribution of Mersenne primes before and after couples of primes found emily Math 34 2017-07-16 18:44
Gaussian-Mersenne & Eisenstein-Mersenne primes siegert81 Math 2 2011-09-19 17:36
A conjecture about Mersenne primes and non-primes Unregistered Information & Answers 0 2011-01-31 15:41
Mersenne Wiki: Improving the mersenne primes web site by FOSS methods optim PrimeNet 13 2004-07-09 13:51

All times are UTC. The time now is 10:41.

Sun Jun 7 10:41:12 UTC 2020 up 74 days, 8:14, 0 users, load averages: 1.15, 1.05, 1.01

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.