mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2022-09-16, 02:32   #1
bbb120
 
"特朗普trump"
Feb 2019
朱晓丹没人草

22·3·11 Posts
Default 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
bbb120 is offline   Reply With Quote
Old 2022-09-16, 03:22   #2
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

72·47 Posts
Default

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
a1call is online now   Reply With Quote
Old 2022-09-16, 07:45   #3
bbb120
 
"特朗普trump"
Feb 2019
朱晓丹没人草

100001002 Posts
Default 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
bbb120 is offline   Reply With Quote
Old 2022-09-16, 08:41   #4
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
"name field"
Jun 2011
Thailand

3×5×683 Posts
Default

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?
LaurV is offline   Reply With Quote
Old 2022-09-16, 09:06   #5
bbb120
 
"特朗普trump"
Feb 2019
朱晓丹没人草

22·3·11 Posts
Default

Quote:
Originally Posted by LaurV View Post
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
bbb120 is offline   Reply With Quote
Old 2022-09-16, 09:27   #6
bbb120
 
"特朗普trump"
Feb 2019
朱晓丹没人草

22·3·11 Posts
Default

Quote:
Originally Posted by LaurV View Post
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 !
bbb120 is offline   Reply With Quote
Old 2022-09-16, 09:41   #7
bbb120
 
"特朗普trump"
Feb 2019
朱晓丹没人草

22×3×11 Posts
Default

Quote:
Originally Posted by bbb120 View Post
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
bbb120 is offline   Reply With Quote
Reply

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

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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔