![]() |
|
|
#34 | |
|
Apr 2014
2·7 Posts |
Quote:
b == M1 to b == m1 So the correct code is: /*-------------------------------------------------------------- New Mersenne test as fast as possible in Pari/GP --------------------------------------------------------------*/ NewMersenneFast(p) = { local(m, m1, m2, b); m = 1<<p - 1; m1 = m - 1; m2 = m1 / 2; b = lift(Mod(3, m)^m2); if (b == m1, print(p, " prime"), print(p, " no prime")); } /*------------------------------------------------------------*/ Greetings boldi |
|
|
|
|
|
|
#35 | |
|
Apr 2014
2·7 Posts |
Quote:
As I can see, You make the same mistake as M. and S. -- You misunderstood the conjecture as Fermat test. This is not the case. Greetings boldi Last fiddled with by boldi on 2014-04-14 at 19:46 |
|
|
|
|
|
|
#36 |
|
Apr 2014
2×7 Posts |
@Mayer
@Silverman @Batalov thank You for Your replies, but please calm down. It is not necessary to attack me. Let us be constructive. All I have done is, to give a conjecture, I have also shown a new algorithm, and all I ask is, if anybody knows, if the conjecture ist proven or unproven. But all I have got are personal attacks. I attacked no one here. But if someone tolds me, "this [conjecture] is in fact a long-since-disproven - allegations", I have every right to ask for a paper where I can read about it. But it seems more and more, that You misunderstood the conjecture as Fermat test -- this is not the case. Fermat's little theorem states, that if p is a prime number, then for any integer a, the number a^p − a is an integer multiple of p. What I say is more specific: Take the number 3 and a Mersenne number M. If 3 and M satisfies the relation 3^(M-1) ≡ 1 mod M, then M must be a prime number. In Fermats little theorem You will not find such an statement. Sure, the conjecture is next to Fermat test, but it is not the same. Compared with the Fermat test, there are also no pseudo prime numbers who can pass this test. (This is my claim, and all I do here is ask for a well-known proof.) The conjecture is also only menat for number 3 as base, not for other numbers like in Fermat test. So please stop pointing me to Fermats little theorem. All I ask is: Is the conjecture 3^(M-1) ≡ 1 mod M (only if M is prime) proven or is it disproven, or where can I read about it? Again I make the proposal to be constructive. I think we are all interested in number theory, and the prime research and his math are fascinating topics. If the conjecture is unproven, we could work together to find a proof and create a new prime test. The positive thing is: The recursive algorithm I have shown is only an example to point out, that the conjecture leads to an algorithm, wich is at least as simple as Lucas Lehman. I have never told, this is the best way to calculate the congruence relation. Compared with Lucas-Lehmer, we can caluclate the relation not only in one recursive way. We have to calculate a modular exponentiation and this can be done in several ways. May be we find some one, who needs less time as LL. (This is because I am here). It would be great if we could discuse the best modular exponentiation algorithm available for this task. Also it is possible to write down the conjecture in other terms. Examples are: 3^(M-1) ≡ 1 mod M (only if M is prime) or 3^M ≡ 3 mod M or 3^((M-1)/2) ≡ -1 mod M or 3^((M+1)/2) ≡ -3 mod M From my point of view, all these expressions could be valid prime tests. And may be we find some other, who fullfill better the needs of modular exponentiation algorithm. I think, the math behind LL does not allow so many possibilities. Greetings boldi |
|
|
|
|
|
#37 |
|
"Mr. Meeseeks"
Jan 2012
California, USA
87816 Posts |
Wrong or right... parts of this forum is the place to go to get attacked if you are wrong in even a degree, sadly.
|
|
|
|
|
|
#38 | ||
|
Apr 2014
168 Posts |
Quote:
But it could be we find a better exponentation for this task or we find a better congruence to get faster results. From my point of view, the shown congruence is only a starting point. Quote:
Greetings boldi |
||
|
|
|
|
|
#39 | |
|
If I May
"Chris Halsall"
Sep 2002
Barbados
37×263 Posts |
Quote:
If one is wrong one must accept being questioned for being wrong -- and be willing to stand up if one believes one are correct. It's called the "Scientific Method". It's healthy, although many find it uncomfortable (did I smell that correctly?). |
|
|
|
|
|
|
#40 | |
|
"Mr. Meeseeks"
Jan 2012
California, USA
23·271 Posts |
Quote:
|
|
|
|
|
|
|
#41 |
|
If I May
"Chris Halsall"
Sep 2002
Barbados
37·263 Posts |
|
|
|
|
|
|
#42 | ||
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
250616 Posts |
So you can write:
Quote:
Quote:
|
||
|
|
|
|
|
#43 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
Last fiddled with by science_man_88 on 2014-04-14 at 21:03 Reason: correcting case etc. |
|
|
|
|
|
|
#44 | |
|
If I May
"Chris Halsall"
Sep 2002
Barbados
37×263 Posts |
Quote:
|
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fastest software for Mersenne primality test? | JonathanM | Information & Answers | 25 | 2020-06-16 02:47 |
| New Mersenne primality test | Prime95 | Miscellaneous Math | 19 | 2014-08-23 04:18 |
| LLT Cycles for Mersenne primality test: a draft | T.Rex | Math | 1 | 2010-01-03 11:34 |
| Mersenne Primality Test in Hardware | Unregistered | Information & Answers | 4 | 2007-07-09 00:32 |
| A primality test for Fermat numbers faster than Pépin's test ? | T.Rex | Math | 0 | 2004-10-26 21:37 |