![]() |
|
|
#1 |
|
"谁改我名死全"
Feb 2019
朱晓丹没人草
2×71 Posts |
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 2022-09-16 at 02:48 |
|
|
|
|
|
#2 |
|
"Rashid Naimi"
Oct 2015
Remote to Here/There
2×11×109 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 |
|
|
|
|
|
#3 |
|
"谁改我名死全"
Feb 2019
朱晓丹没人草
2·71 Posts |
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 2022-09-16 at 08:38 Reason: No need to create a new thread in the same sub forum |
|
|
|
|
|
#4 |
|
Romulan Interpreter
"name field"
Jun 2011
Thailand
41·251 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?
|
|
|
|
|
|
#5 | |
|
"谁改我名死全"
Feb 2019
朱晓丹没人草
100011102 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) [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:
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, 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. 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 |
|
|
|
|
|
|
#6 |
|
"谁改我名死全"
Feb 2019
朱晓丹没人草
2×71 Posts |
pfgw is really a good primality software !
|
|
|
|
|
|
#7 | |
|
"谁改我名死全"
Feb 2019
朱晓丹没人草
2·71 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=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 |
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| nextprime() odd behavior? | EdH | YAFU | 4 | 2021-03-29 20:19 |
| nextprime function is spooked by leading zero. | shortcipher | YAFU | 5 | 2018-03-27 13:59 |
| nextprime() appears to be limited... | EdH | YAFU | 7 | 2013-03-18 22:09 |
| PFGW can't find a small factor. | Arkadiusz | Software | 7 | 2013-02-18 12:43 |
| PFGW 3.3.6 or PFGW 3.4.2 Please update now! | Joe O | Sierpinski/Riesel Base 5 | 5 | 2010-09-30 14:07 |