20141210, 16:14  #23  
"Forget I exist"
Jul 2009
Dartmouth NS
2×3×23×61 Posts 
Quote:


20141210, 16:25  #24 
Dec 2014
2^{2}×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  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Modifying the Lucas Lehmer Primality Test into a fast test of nothing  Trilo  Miscellaneous Math  25  20180311 23:20 
A second proof for the LucasLehmer Test  carpetpool  Miscellaneous Math  2  20170730 09:21 
LucasLehmer Test  storm5510  Math  22  20090924 22:32 
Lucas Lehmer test question?  BMgf  Programming  23  20031209 08:52 
about LucasLehmer test and Prime 95  Annunaki  Math  22  20030805 21:52 