20191026, 02:21  #23 
"Sam"
Nov 2016
100101100_{2} Posts 
Is it possible to generalize to b = (any constant c) ? Say b = 5? Is it supposed to work for all primes p, or perhaps just those such that (a^24) is a quadratic residue (or non residue) mod p?

20191026, 02:31  #24  
Sep 2002
Database er0rr
3^{2}×7×53 Posts 
Quote:
For example: Code:
b=2;forstep(n=3,10000000,2,if(!ispseudoprime(n)&&Mod(b,n)^(n1)==1,a=b;r=1;while(a!=1,if(kronecker(a^24,n)==1&&gcd(a^21,n)==1&&Mod(Mod(1,n)*b*x,x^2a*x+1)^((n+1)/2)==b*kronecker(b*(a+2),n),print([b,n,r,a]));r++;a=(a*b)%n))) [2, 2047, 6, 64] [2, 42799, 11, 2048] [2, 90751, 38, 25020] [2, 256999, 15, 32768] [2, 271951, 38, 170282] [2, 514447, 90, 72499] [2, 741751, 108, 729064] [2, 916327, 120, 513301] [2, 2205967, 186, 1023752] [2, 2304167, 15, 32768] [2, 2748023, 120, 220632] [2, 2811271, 28, 1364711] [2, 2953711, 23, 2481186] [2, 2976487, 216, 271594] [2, 4469471, 153, 2703791] [2, 4863127, 276, 1059661] [2, 5016191, 162, 3677584] [2, 6334351, 182, 2259489] [2, 6787327, 326, 440965] [2, 7674967, 59, 3268337] [2, 8095447, 356, 2233088] [2, 8388607, 12, 4096] [2, 8727391, 18, 262144] [2, 9588151, 20, 1048576] [2, 9995671, 23, 8388608] Last fiddled with by paulunderwood on 20191026 at 02:45 

20191026, 20:36  #25  
"Sam"
Nov 2016
2^{2}×3×5^{2} Posts 
Quote:
I replaced b=2 to b=3: Code:
[3, 1683683, 15, 879443] [3, 1898999, 141, 1444216] [3, 2586083, 27, 1612472] [3, 2795519, 171, 2214249] [3, 4042403, 25, 940643] [3, 4099439, 207, 3562151] [3, 5087171, 28, 3216314] [3, 8243111, 120, 2486937] Maybe there could be some undiscovered primality test associated with that? 

20191026, 21:12  #26  
Sep 2002
Database er0rr
3^{2}·7·53 Posts 
Quote:
Last fiddled with by paulunderwood on 20191026 at 21:39 

20191028, 02:13  #27 
Sep 2002
Database er0rr
3^{2}×7×53 Posts 
b=3
For b=3 and a least odd n<10^9, pseudoprimes satisfy 2*r1 == znorder(Mod(b,n)) (as well as carpetpool's (paul) observation that 3 is a QR)
Thus without computing the order, two tests should be enough when J(3,n)==1. Alternatively make sure gcd(2*r1,n1)==1 Last fiddled with by paulunderwood on 20191028 at 03:01 
20191029, 20:50  #28 
Sep 2002
Database er0rr
3^{2}·7·53 Posts 
Algoritm for b=3
Turning the b=3 ideas into an algorithm:
Code:
{ b_3(n)=local(a=3,r=1,k,g,BIN,LEN,va,vb); if(n==2n==3n==5n==11,return(1)); if(gcd(2,n)!=1,return(0)); if(issquare(n),return(0)); if(Mod(3,n)^(n1)!=1,return(0)); k=kronecker(a*a4,n);g=gcd(a*a1,n); while(k==1g!=1gcd(2*r1,n1)!=1, if(k==0(1<g&&g<n),return(0),a=(a*3)%n;k=kronecker(a*a4,n);g=gcd(a*a1,n);r++)); va=2;vb=a;BIN=binary(n);LEN=length(BIN)1; for(k=1,LEN, if(BIN[k],va=(va*vba)%n;vb=(vb*vb2)%n,vb=(va*vba)%n;va=(va*va2)%n)); k=kronecker(a+2,n);return(va==(a*k)%n&&vb==(2*k)%n) } Last fiddled with by paulunderwood on 20191029 at 21:13 
20191031, 01:47  #29 
"Sam"
Nov 2016
12C_{16} Posts 

20191031, 02:10  #30 
Sep 2002
Database er0rr
3^{2}·7·53 Posts 
Then "a" gets repeatedly multiplied by "b=3" until the conditions are met.
I am not so sure about my asertion of taking gcd(2*r1,n1)... I have checked the b=3 test up to 9*10^10. I am mostly looking at b=6 which I hope to test to 1.2*10^15 for all r n a reasonable amount of time 
20191127, 02:40  #31 
Sep 2002
Database er0rr
3^{2}×7×53 Posts 
Amazing any number  a puzzle
I introduce two other steps to the hitherto 2 selfridge test, being a gcd and another selfridge
Let d=a^24 be the discriminant of x^2a*x+1. I add the test d^((n1)/2)==1 (mod n). Since a=x+1/x we have a^22 = (x^2+1)/x^2. The original 2 selfridge test is (b*x)^((n+1)/2)=b*J(b(a+2),n) (mod n, x^2a*x+1), But a^((n+1)/2)=b^((n+1)/2). Which is equivalent to saying the test is (x^2+1)^((n+1)/2)=b*J(b(a+2),n) (mod n, x^2a*x+1). So, I introduce gcd(a^22,n)=1. Then I ran a test: Code:
{for(b=1,1024,forstep(n=9,1000000,2, if(gcd(b^3b,n)==1&&!ispseudoprime(n)&&Mod(b,n)^((n1))==1, a=b;r=1;while(a!=1, if(kronecker(a^24,n)==1&&gcd(a^3a,n)==1&&gcd(a^22,n)==1&& Mod(a^24,n)^((n1)/2)==1&& Mod(Mod(1,n)*x*b,x^2a*x+1)^((n+1)/2)==b*kronecker(b*(a+2),n), print([b,n,r,a]));r++;a=a*b%n))))} I shall run some tests through a script given to me by Dr. David Broadhurst to see if I can find some counterexamples. Edit: b=powers of 3 give counterexamples readily. But other b? Last fiddled with by paulunderwood on 20191127 at 04:34 
20191127, 07:02  #32 
Sep 2002
Database er0rr
3339_{10} Posts 

20191127, 08:45  #33 
Sep 2002
Database er0rr
3^{2}×7×53 Posts 
Here is a short paper describing the idea

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Don't miss this amazing trick that the moon is going to do!  Uncwilly  Astronomy  6  20180201 05:40 
Amazing result in P1  Miszka  Information & Answers  2  20140704 17:11 
Amazing academic resource  Xyzzy  Lounge  6  20120325 22:57 
Amazing!!!  R.D. Silverman  Factoring  5  20060126 09:14 
Two Amazing Things  clowns789  Hardware  1  20031227 16:57 