mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2014-12-10, 16:14   #23
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dartmouth NS

2×3×23×61 Posts
Default

Quote:
Originally Posted by eumayer View Post
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.
science_man_88 is offline   Reply With Quote
Old 2014-12-10, 16:25   #24
Mathsgirl
 
Mathsgirl's Avatar
 
Dec 2014

22×5 Posts
Default

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)
Mathsgirl is offline   Reply With Quote
Reply

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 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

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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, 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.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔