mersenneforum.org how can I find nextprime with the help of pfgw?
 Register FAQ Search Today's Posts Mark Forums Read

 2022-09-16, 02:32 #1 bbb120   "特朗普trump" Feb 2019 朱晓丹没人草 22·3·11 Posts how can I find nextprime with the help of pfgw? I want to know nextprime(10^1000), Code: pfgw -qnextprime(10^1000) 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. but what I really want to get is 10^1000+453 ,not nextprime(10^1000) who can help me? Last fiddled with by bbb120 on 2022-09-16 at 02:48
 2022-09-16, 03:22 #2 a1call     "Rashid Naimi" Oct 2015 Remote to Here/There 72·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 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. Last fiddled with by a1call on 2022-09-16 at 03:23
 2022-09-16, 07:45 #3 bbb120   "特朗普trump" Feb 2019 朱晓丹没人草 100001002 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 my command is Code: pfgw input.txt -b2 I use pfgw to search the prp Last fiddled with by S485122 on 2022-09-16 at 08:38 Reason: No need to create a new thread in the same sub forum
 2022-09-16, 08:41 #4 LaurV 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?
2022-09-16, 09:06   #5
bbb120

"特朗普trump"
Feb 2019

22·3·11 Posts

Quote:
 Originally Posted by LaurV 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?
I find the prp 118112+(2^(2^15)+1) !
F15+118112

check command
Code:
pfgw -q118112+(2^(2^15)+1) -tc
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.
check command
Code:
pfgw -q118112+(2^(2^15)+1) -tp
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.
why N+1 test base is different?
one is base 9+sqrt(19), the other is base 7+sqrt(7)

Last fiddled with by bbb120 on 2022-09-16 at 09:10

2022-09-16, 09:27   #6
bbb120

"特朗普trump"
Feb 2019

22·3·11 Posts

Quote:
 Originally Posted by LaurV 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?
pfgw is really a good primality software !

2022-09-16, 09:41   #7
bbb120

"特朗普trump"
Feb 2019

22×3×11 Posts

Quote:
 Originally Posted by bbb120 I find the prp 118112+(2^(2^15)+1) ! F15+118112 check command Code: pfgw -q118112+(2^(2^15)+1) -tc 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. check command Code: pfgw -q118112+(2^(2^15)+1) -tp 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. why N+1 test base is different? one is base 9+sqrt(19), the other is base 7+sqrt(7)
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]]
]

Last fiddled with by bbb120 on 2022-09-16 at 09:43

 Similar Threads Thread Thread Starter Forum Replies Last Post EdH YAFU 4 2021-03-29 20:19 shortcipher YAFU 5 2018-03-27 13:59 EdH YAFU 7 2013-03-18 22:09 Arkadiusz Software 7 2013-02-18 12:43 Joe O Sierpinski/Riesel Base 5 5 2010-09-30 14:07

All times are UTC. The time now is 14:26.

Tue Nov 29 14:26:53 UTC 2022 up 103 days, 11:55, 1 user, load averages: 1.05, 0.89, 0.90