Pierpont primes: Difference between revisions

Content added Content deleted
Line 507: Line 507:
n2,n3,t := BI(0),BI(0),BI(0);
n2,n3,t := BI(0),BI(0),BI(0);
while(count1.min(count2) < n){
while(count1.min(count2) < n){
n2.set(s[i2]).mul(two);
n2.set(s[i2]).mul(two); // .mul, .add, .sub are in-place
n3.set(s[i3]).mul(three);
n3.set(s[i3]).mul(three);
if(n2<n3){ t.set(n2); i2+=1; }
if(n2<n3){ t.set(n2); i2+=1; }
Line 519: Line 519:
count1+=1;
count1+=1;
}
}
t.sub(two);
if(count2<n and t.sub(two).probablyPrime()){
if(count2<n and t.probablyPrime()){
pps2.append(t.copy());
pps2.append(t.copy());
count2+=1;
count2+=1;