![]() |
how can I find nextprime with the help of pfgw?
I want to know nextprime(10^1000),
[CODE]pfgw -qnextprime(10^1000)[/CODE] but pfgw tell me [CODE]PFGW Version 4.0.3.64BIT.20220704.Win_Dev [GWNUM 29.8] nextprime(10^1000) is trivially prime!: 2 Done.[/CODE] but what I really want to get is 10^1000+453 ,not nextprime(10^1000) who can help me? |
Read the ABCFILEFORMAT file (or something similar)
And script a variable to increment with logical steps say by 2. There are no (simple) shortcuts. You will have to sieve (software does a basic sieve) and check each increment for primality. You should also look into Pari-GP. It’s a programmable calculator and will give you next/previous primes. I combine both software for my hobby. PFGW is the fastest primality checking software, but is not as flexible as PARI-GP. Just my 2 cents. |
What is the smallest prime number greater than F15?
What is the smallest prime number greater than F15?
F15=2^(2^15)+1 fermat number I check F15+n for 0<=n<=80000, but I can not find any prp, but prime number theorem tells us that the gap is approximate 2^15*log(2)=22713.0468126, 80000/22713=3.5222119491 my input.txt content [CODE]ABC2 $a+(2^(2^15)+1) a: from 00000 to 80000 step 2 [/CODE] my command is [CODE]pfgw input.txt -b2[/CODE] I use pfgw to search the prp |
2^15 is 32768, so those numbers have about 10 thousand digits, so it is not difficult to PRP them, even pari/gp can do it quite fast. How about you first learn how to use pfgw, before opening a gazilion threads claiming "bugs" in all available tools we use?
|
[QUOTE=LaurV;613536]2^15 is 32768, so those numbers have about 10 thousand digits, so it is not difficult to PRP them, even pari/gp can do it quite fast. How about you first learn how to use pfgw, before opening a gazilion threads claiming "bugs" in all available tools we use?[/QUOTE]
I find the prp 118112+(2^(2^15)+1) ! F15+118112 check command [CODE]pfgw -q118112+(2^(2^15)+1) -tc[/CODE] output [CODE]PFGW Version 4.0.3.64BIT.20220704.Win_Dev [GWNUM 29.8] Primality testing 118112+(2^(2^15)+1) [N-1/N+1, Brillhart-Lehmer-Selfridge] Running N-1 test using base 7 Running N+1 test using discriminant 19, base 9+sqrt(19) 118112+(2^(2^15)+1) is Fermat and Lucas PRP! (4.9587s+0.0006s) Done.[/CODE] check command [CODE]pfgw -q118112+(2^(2^15)+1) -tp[/CODE] output [CODE]PFGW Version 4.0.3.64BIT.20220704.Win_Dev [GWNUM 29.8] Primality testing 118112+(2^(2^15)+1) [N+1, Brillhart-Lehmer-Selfridge] Running N+1 test using discriminant 7, base 7+sqrt(7) 118112+(2^(2^15)+1) is Lucas PRP! (4.0007s+0.0006s) Done.[/CODE] why N+1 test base is different? one is base 9+sqrt(19), the other is base 7+sqrt(7) |
[QUOTE=LaurV;613536]2^15 is 32768, so those numbers have about 10 thousand digits, so it is not difficult to PRP them, even pari/gp can do it quite fast. How about you first learn how to use pfgw, before opening a gazilion threads claiming "bugs" in all available tools we use?[/QUOTE]
pfgw is really a good primality software ! |
[QUOTE=bbb120;613538]I find the prp 118112+(2^(2^15)+1) !
F15+118112 check command [CODE]pfgw -q118112+(2^(2^15)+1) -tc[/CODE] output [CODE]PFGW Version 4.0.3.64BIT.20220704.Win_Dev [GWNUM 29.8] Primality testing 118112+(2^(2^15)+1) [N-1/N+1, Brillhart-Lehmer-Selfridge] Running N-1 test using base 7 Running N+1 test using discriminant 19, base 9+sqrt(19) 118112+(2^(2^15)+1) is Fermat and Lucas PRP! (4.9587s+0.0006s) Done.[/CODE] check command [CODE]pfgw -q118112+(2^(2^15)+1) -tp[/CODE] output [CODE]PFGW Version 4.0.3.64BIT.20220704.Win_Dev [GWNUM 29.8] Primality testing 118112+(2^(2^15)+1) [N+1, Brillhart-Lehmer-Selfridge] Running N+1 test using discriminant 7, base 7+sqrt(7) 118112+(2^(2^15)+1) is Lucas PRP! (4.0007s+0.0006s) Done.[/CODE] why N+1 test base is different? one is base 9+sqrt(19), the other is base 7+sqrt(7)[/QUOTE] I test primality on 118112+(2^(2^15)+1) with miller-rabin test with random bases, and it tell me true true true!!! my mathematica miller rabin code [CODE](*miller rabin test,n0 big odd integer,a0 base*) MillerRabin[n0_,a0_]:=Module[{n=n0,a=a0,s,m,t1,k}, s=0;m=n-1;While[Mod[m,2]==0,m=m/2;s=s+1]; t1=PowerMod[a,m,n]; If[t1==1,Return[True]]; k=0;While[k<s-1&&t1!=n-1,k=k+1;t1=Mod[t1^2,n]]; If[t1==n-1,Return[True],Return[False]] ] [/CODE] |
| All times are UTC. The time now is 14:12. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.