20220916, 02:32  #1 
"特朗普trump"
Feb 2019
朱晓丹没人草
84_{16} Posts 
how can I find nextprime with the help of pfgw?
I want to know nextprime(10^1000),
Code:
pfgw qnextprime(10^1000) Code:
PFGW Version 4.0.3.64BIT.20220704.Win_Dev [GWNUM 29.8] nextprime(10^1000) is trivially prime!: 2 Done. who can help me? Last fiddled with by bbb120 on 20220916 at 02:48 
20220916, 03:22  #2 
"Rashid Naimi"
Oct 2015
Remote to Here/There
7^{2}·47 Posts 
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 PariGP. 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 PARIGP. Just my 2 cents. Last fiddled with by a1call on 20220916 at 03:23 
20220916, 07:45  #3 
"特朗普trump"
Feb 2019
朱晓丹没人草
2^{2}·3·11 Posts 
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:
pfgw input.txt b2 Last fiddled with by S485122 on 20220916 at 08:38 Reason: No need to create a new thread in the same sub forum 
20220916, 08:41  #4 
Romulan Interpreter
"name field"
Jun 2011
Thailand
3·5·683 Posts 
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?

20220916, 09:06  #5  
"特朗普trump"
Feb 2019
朱晓丹没人草
2^{2}×3×11 Posts 
Quote:
F15+118112 check command Code:
pfgw q118112+(2^(2^15)+1) tc Code:
PFGW Version 4.0.3.64BIT.20220704.Win_Dev [GWNUM 29.8] Primality testing 118112+(2^(2^15)+1) [N1/N+1, BrillhartLehmerSelfridge] Running N1 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:
pfgw q118112+(2^(2^15)+1) tp Code:
PFGW Version 4.0.3.64BIT.20220704.Win_Dev [GWNUM 29.8] Primality testing 118112+(2^(2^15)+1) [N+1, BrillhartLehmerSelfridge] Running N+1 test using discriminant 7, base 7+sqrt(7) 118112+(2^(2^15)+1) is Lucas PRP! (4.0007s+0.0006s) Done. one is base 9+sqrt(19), the other is base 7+sqrt(7) Last fiddled with by bbb120 on 20220916 at 09:10 

20220916, 09:27  #6 
"特朗普trump"
Feb 2019
朱晓丹没人草
2^{2}·3·11 Posts 
pfgw is really a good primality software !

20220916, 09:41  #7  
"特朗普trump"
Feb 2019
朱晓丹没人草
84_{16} Posts 
Quote:
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=n1;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<s1&&t1!=n1,k=k+1;t1=Mod[t1^2,n]]; If[t1==n1,Return[True],Return[False]] ] Last fiddled with by bbb120 on 20220916 at 09:43 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
nextprime() odd behavior?  EdH  YAFU  4  20210329 20:19 
nextprime function is spooked by leading zero.  shortcipher  YAFU  5  20180327 13:59 
nextprime() appears to be limited...  EdH  YAFU  7  20130318 22:09 
PFGW can't find a small factor.  Arkadiusz  Software  7  20130218 12:43 
PFGW 3.3.6 or PFGW 3.4.2 Please update now!  Joe O  Sierpinski/Riesel Base 5  5  20100930 14:07 