20200317, 16:00  #23 
Sep 2002
Database er0rr
3^{2}·7·53 Posts 
I am moving thread to "Programming".
Last fiddled with by paulunderwood on 20200317 at 16:05 
20200317, 16:08  #24 
Nov 2017
Karlsruhe, Germany
31 Posts 
I'm perfectly happy have the programming part of this discussion moved somewhere else.
Though I do believe the question if \(\exists S \left( n \right) \equiv 1 \mod M_p\) belongs here. 
20200317, 16:12  #25  
Nov 2003
1110100100100_{2} Posts 
Quote:
of the full twisted group iff q is prime. Otherwise, 4 generates a subgroup of the full twisted group. 

20200317, 16:18  #26 
Sep 2002
Database er0rr
3^{2}·7·53 Posts 
I will move it back and leave it up to another mod to pick apart the Java aspects.

20200317, 16:26  #27 
Nov 2017
Karlsruhe, Germany
31 Posts 

20200317, 22:26  #28 
Nov 2017
Karlsruhe, Germany
31 Posts 
Continuation of: Can the subtraction in the lucal lehmer test ever return a negative value?
The original topic which was about certain edge cases in the LucasLehmerTest derailed fairly quickly and I'd like to continue the programming discussion here.
So @axn, any idea what seems to be wrong with your code? And in Java & is the bitwise AND operator @paulunderwood. And so is the and method here. 
20200317, 22:27  #29  
Nov 2017
Karlsruhe, Germany
31 Posts 
Quote:
Also @bearnol would you putting your doubts about his statements into words here too? The programming discussion may continue here: https://www.mersenneforum.org/showthread.php?p=539988 Last fiddled with by BrainStone on 20200317 at 22:28 

20200317, 22:44  #30 
Nov 2003
2^{2}×5×373 Posts 
An full explanation would require quite a bit of prerequisite knowledge; At least a semester
of group theory and another semester of studying finite fields. Perhaps the best source for the latter is Lidl & Niederreiter's book on finite fields. 
20200317, 22:49  #31 
Sep 2002
Database er0rr
3^{2}·7·53 Posts 
Code:
p=13;n=2^p1;S=4; for(k=3,p,S=S^22; S=bitand(S,n)+(S>>p);if(S>=n,S=n); print([p,S])) Code:
[13, 14] [13, 194] [13, 4870] [13, 3953] [13, 5970] [13, 1857] [13, 36] [13, 1294] [13, 3470] [13, 128] [13, 0] Last fiddled with by paulunderwood on 20200317 at 22:50 
20200317, 23:39  #32 
Nov 2017
Karlsruhe, Germany
31 Posts 

20200318, 06:50  #33 
Romulan Interpreter
Jun 2011
Thailand
5·11·157 Posts 
Threads merged and moved to programming.
There was no reason to split threads, the initial thread already gave all the answers, including from RDS, who was actually quite right. The fact you don't like the answers is not a reason to clutter. You are using java (terrible slow, interpreted, not compiled, no FFT multiplication, which translates to thousands of times slower than a "normal" gmp or gwnum implementation, and it is limited for integer size to 40k bytes or so, therefore completely futile to test any reasonable exponent), but in the same time you seem to be quite nitpicking on subtracting 2 before or after taking the modular from the square. People gave you already a better way to avoid division taking advantage of the binary form of the modulus, which would double the speed (not in pari, bitand is terrible slow there), with or without subtracting 2, and you are still fixed on that subtracting 2. C'mon man, it is like racing a tractor against a ferrary and trying to make your tractor faster by changing the position of the mirror or something, to avoid "catching the wind", or throwing out the knob of the handbrake because "it is too heavy". Listen to these guys, they know what they are talking. Last fiddled with by LaurV on 20200318 at 06:55 
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  Mathsgirl  Information & Answers  23  20141210 16:25 
LucasLehmer Test  storm5510  Math  22  20090924 22:32 
Lucas Lehmer test question?  BMgf  Programming  23  20031209 08:52 