mersenneforum.org Lucas-Lehmer test
 Register FAQ Search Today's Posts Mark Forums Read

2014-12-10, 16:14   #23
science_man_88

"Forget I exist"
Jul 2009
Dartmouth NS

2×3×23×61 Posts

Quote:
 Originally Posted by eumayer Code: and what's soo cool about it is that my code can only return 8 mersenne primes, where as this one can return moreee because it is only finding the correct p, which is a lot smaller than m so my computer can handle it.! if that is all correct! that is awesome Mathgirl makes me confused Which 8 Mersenne primes can your computer return only? The first 8 ones? 22-1, 23-1, 25-1, 27-1, 213-1, 217-1, 219-1, 231-1 ????? If you really find the code to calculate the correct p for new-record Mersenne primes, then you just made GIMPS redundant But I am pretty much sure u didn´t !
I think what's meant is that when you use the mersenne primes as exponents you would end up with 2^(2^31-1)-1 so the next would exponent tried would overflow a 32 bit register with that mistake where as now She can check all exponents up to the limit of 32 bits instead of the double mersenne numbers that could be prime or not.

 2014-12-10, 16:25 #24 Mathsgirl     Dec 2014 22×5 Posts well if you say for p in range(1, 1000): LucasLehmertest(p) # the test I showed everyone earlier it returns all the correct Mersenne primes, with corresponding primes in the range(1, 1000). Whereas the code I wrote originally could only return the first 8 Mersenne primes. My original code looks like this for p in primes: # I had created a list of prime numbers mersenneprimes = [m for m in primes if (log(m + 1))/log(2) in primes] so my code is checking values that are much, much larger than the LLT is checking. Now my computer can find about the first 20 mersenne primes with the LLT (maybe more, my computer is still running it now)

 Similar Threads Thread Thread Starter Forum Replies Last Post Trilo Miscellaneous Math 25 2018-03-11 23:20 carpetpool Miscellaneous Math 2 2017-07-30 09:21 storm5510 Math 22 2009-09-24 22:32 BMgf Programming 23 2003-12-09 08:52 Annunaki Math 22 2003-08-05 21:52

All times are UTC. The time now is 03:02.

Tue Feb 7 03:02:26 UTC 2023 up 173 days, 30 mins, 1 user, load averages: 0.95, 1.18, 1.12