20190411, 03:14  #1 
Apr 2019
17 Posts 
Reserve The Formula
Hi...
I am a programmer I use a lot base 2 (binary) in my programs I want to know... why can't we reverse Lucaslehmer's formula. like if x=(2^p)1 as divisor, we write LL/x for p2 times why not p as divisor for less ((2^p)1)/4 times you see for (2^82589933)1, if the divisor is p=82589933 p <<< LL divisor... and it is less than quarter times of (2^82589933)1 to finish small divisor=less time rite? I know how LL work because i am a programmer 
20190411, 03:55  #2 
"Curtis"
Feb 2005
Riverside, CA
3·19·89 Posts 
Can you give an example on a smaller number, say 2^31  1, showing more work (like specific iterations)? I'm struggling to follow what you are trying to do.

20190411, 05:06  #3  
Undefined
"The unspeakable one"
Jun 2006
My evil lair
2×23×137 Posts 
Quote:


20190411, 16:23  #4  
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
2×5×593 Posts 
Quote:
The initial post seems to me incoherent, which sometimes indicates lack of understanding, or unclear thinking. 

20190411, 17:25  #5  
Bamboozled!
"đ’‰şđ’ŚŚđ’‡·đ’†·đ’€"
May 2003
Down not across
11×17×59 Posts 
Quote:
The quoted post seems to me incoherent, which sometimes indicates lack of understanding, or unclear thinking. Nonetheless, the reverse algorithm, though possible, is too demanding of storage space. I once accused RDS of being an engineer rather than a mathematician with respect to this algorithm. He, of course, viewed the accusation with the humour which I'd intended. 

20190411, 17:46  #6 
"Carlos Pinho"
Oct 2011
Milton Keynes, UK
3·1,663 Posts 
Hereâ€™s the answer to â€śReverse The Formulaâ€ť: alumroF ehTâ€ť

20190411, 17:56  #7 
Undefined
"The unspeakable one"
Jun 2006
My evil lair
2×23×137 Posts 
Just for fun let's reverse M5 (2^{5}1 = 31)
Start with the assumption that it is prime, so the LL final step produces s=0 3) s=0 2) s=sqrt(0+2 mod 31) ==> s=8, or s=23, which do we choose? let's go with 8 1) s=sqrt(8+2 mod 31) ==> s=14, or s=17, which do we choose? let's go with 14 0) s=sqrt(14+2 mod 31) ==> s=4, or s=27, which do we choose? let's go with 4 so the final result is 4 success, it is prime. Yay But what happens if we choose the other square root? 3) s=0 2) s=sqrt(0+2 mod 31) ==> s=8, or s=23, which do we choose? let's go with 23 1) s=sqrt(23+2 mod 31) ==> s=5, or s=26,(which do we choose? let's go with 5 0) s=sqrt(5+2 mod 31) ==> s=10, or s=21, which do we choose? let's go with 10 so the final result is 10 success, it is prime. Yay Let's try another reverse path 3) s=0 2) s=sqrt(0+2 mod 31) ==> s=8, or s=23, which do we choose?)let's go with 23 1) s=sqrt(23+2 mod 31) ==> s=5, or s=26, which do we choose? let's go with 26 0) s=sqrt(26+2 mod 31) ==> s=11, or s=20, which do we choose? let's go with 11 so the final result is 11 (the same as 2/3) success, it is prime. Yay So it does work, and we can end up with any of the possible start values 4, 10, 2/3 etc. Let's try with a nonprime M11 (2047) 9) s=0 (assume it is prime) 8) s=sqrt(0+2 mod 2047) ==> s=64, or s=1983, which do we choose? let's go with 64 7) s=sqrt(64+2 mod 2047) ==> s=?? there is no result here, let's try the other side 7) s=sqrt(1983+2 mod 2047) ==> s=?? there is no result here either So this number isn't prime, there are no paths that lead to a valid start value. And it only took two steps. So this is better than the LL test right? Fewer steps. But the details matter. How do we take fast square roots modulo a number? That is an exercise left for the reader. Last fiddled with by retina on 20190411 at 18:09 
20190411, 18:06  #8  
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
2×5×593 Posts 
Quote:
Or that the original poster was the only one capable of error or lack of clarity. Another possibility is English is not Lan's native language. Lan's identity seems well concealed, so no clues available regarding that, other than the text in post 1 here. Ok, LL iteration numbers 1 to p2 get computed in the normal course, from a seed value corresponding to iteration number zero. LL iteration values (residues) ranging 0 to Mp1 are the normal result. Negative iteration values (such as those computed in error, such as by a memory copy failure, giving zero for the square output, then the decrement by two occurring) get represented by underflow, as in the 2 case, as falling in the 0 to Mp1 range (res64 fffffffffffffffd). Yet longtime posters in this forum write of them as value 2 on occasion. Are you saying Lan's post initiating this thread was intended as a joke? I suggest a thread in https://www.mersenneforum.org/forumdisplay.php?f=7 called math humor, for any such posts. 

20190411, 18:36  #9  
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
13452_{8} Posts 
Quote:
I found these interesting: https://math.stackexchange.com/quest...reroot#633174 http://www.ptrow.com/perl/calculator_bigint.pl https://en.wikipedia.org/wiki/Tonell...anks_algorithm Last fiddled with by kriesel on 20190411 at 18:41 

20190411, 19:54  #10  
Apr 2019
11_{16} Posts 
Quote:
((2^311A))mod(2A*31+1) while A is its times for example if A is 2 means 2nd time. 3 means 3rd time. lets use much smaller number say 2^131 which is prime. reverse it u will get 315 from 8191, repeat (315A)mod(2A*13+1) until (2A*13+1) >= (315A) u will get =/=0 then is prime. lets try composite number say 2^111. reverse it u will get 93 from 2047, repeat (93A)mod(2A*11+1) u will get ==0 at 1st time then is composite. 

20190411, 19:59  #11  
Apr 2019
11_{16} Posts 
Quote:
Last fiddled with by Lan on 20190411 at 20:46 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How to reserve very low TF work  snme2pm1  Information & Answers  17  20150223 10:47 
How to reserve an exponent?  TheMawn  Lone Mersenne Hunters  8  20130526 14:50 
How much to reserve for maual LLR?  Ungelovende  Prime Sierpinski Project  2  20080913 22:53 
Is it possible to reserve a specific nvalue for 2^n1?  jasong  PrimeNet  1  20060921 00:10 
Reserve 15K = 869688015  amphoria  15k Search  0  20050918 19:56 