![]() |
|
|
#265 | |
|
May 2010
Prime hunting commission.
69016 Posts |
Quote:
Code:
modbm2(x,n,m)=for(n=x,n,if(isprime(n*p(m)^2+1)&isprime(2*(n*p(m^2)+1)-1)&isPRP((n*p(m)^2+1)*(2*(n*p(m)^2+1)-1)b=2),print((n*p(m)^2+1)*(2*(n*p(m)^2+1)-1)))); Last fiddled with by 3.14159 on 2010-08-11 at 19:06 |
|
|
|
|
|
|
#266 | ||
|
Aug 2006
175B16 Posts |
Quote:
Quote:
Of course the process of fixing that mistake may correct the other, who knows? |
||
|
|
|
|
|
#267 | |
|
Aug 2006
597910 Posts |
Quote:
|
|
|
|
|
|
|
#268 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
|
|
|
|
|
|
|
#269 |
|
Aug 2006
3×1,993 Posts |
I don't know what the goal of that or any of your functions are (well, other than isPRP which I presume checks if the input is a probable-prime. Wait, doesn't yours actually check if it's a strong probable prime instead?
|
|
|
|
|
|
#270 | |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
*facepalm* isPRP is a strong pseudoprimality test and uses base 2. isWPRP is a Fermat test. isSPRP is a strong pseudoprimality test that performs trial factoring to nextprime(106) and uses a random base. Carmichael numbers only pass isWPRP, not the other two, unless the Carmichael number happens to be a strong pseudoprime number to base 2. (Ex: 15841 is a Carmichael number and is a 2-SPRP.) Last fiddled with by 3.14159 on 2010-08-11 at 19:18 |
|
|
|
|
|
|
#271 |
|
Aug 2006
3×1,993 Posts |
I checked the code. The deceptively-named isPRP tests whether the input is a b-strong probable prime. A strong pseudoprimality test would be
Code:
isSPSP(n,b)=isPRP(n,b)&!isprime(n) Code:
isPRP_correct(n,b)=Mod(b,n)^(n-1)==1 Code:
isPSP(n,b)=isPRP_correct(n,b)&&!isprime(n) |
|
|
|
|
|
#272 | |
|
May 2010
Prime hunting commission.
168010 Posts |
Quote:
I suggest that you refresh before reply, as I was in the middle of refining the post, and retract the nonsense accusation. Last fiddled with by 3.14159 on 2010-08-11 at 19:26 |
|
|
|
|
|
|
#273 | ||
|
Aug 2006
135338 Posts |
Quote:
Quote:
|
||
|
|
|
|
|
#274 |
|
Aug 2006
3×1,993 Posts |
I said that your functions were named deceptively. That statement stands.
I did not call you a liar, though I'd be happy to if you can point out an example of yourself lying. Please refine your posts before posting. |
|
|
|
|
|
#275 | ||
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
Quote:
Last fiddled with by 3.14159 on 2010-08-11 at 19:33 |
||
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why do I sometimes see all the <> formatting commands when I quote or edit? | cheesehead | Forum Feedback | 3 | 2013-05-25 12:56 |
| Passing commands to PARI on Windows | James Heinrich | Software | 2 | 2012-05-13 19:19 |
| Ubiquity commands | Mini-Geek | Aliquot Sequences | 1 | 2009-09-22 19:33 |
| 64-bit Pari? | CRGreathouse | Software | 2 | 2009-03-13 04:22 |
| Are these commands correct? | jasong | Linux | 2 | 2007-10-18 23:40 |