![]() |
![]() |
#23 | |
"Forget I exist"
Jul 2009
Dartmouth NS
2×3×23×61 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#24 |
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) |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Modifying the Lucas Lehmer Primality Test into a fast test of nothing | Trilo | Miscellaneous Math | 25 | 2018-03-11 23:20 |
A second proof for the Lucas-Lehmer Test | carpetpool | Miscellaneous Math | 2 | 2017-07-30 09:21 |
Lucas-Lehmer Test | storm5510 | Math | 22 | 2009-09-24 22:32 |
Lucas Lehmer test question? | BMgf | Programming | 23 | 2003-12-09 08:52 |
about Lucas-Lehmer test and Prime 95 | Annunaki | Math | 22 | 2003-08-05 21:52 |