Here is what I'm using to find Sophie Germain primes (and twin primes) at the 1024 (and 1023) bit level:
private void TwinSeeker()
{
BigInteger p1, p2;
string ps;
int cntr = 0;
p1 = 2;
p2 = BigInteger.Pow(2, 1023);
if (p2 % 2 == 0)
{
p2++;
}
while (cntr<100)
{
if (PrimeTest(p2))
{
ps = (p2 * 2 + 1).ToString();
if (PrimeTest(p2*2+1))
{
textBox1_SetText("Sophie Germain = " + ps);
cntr++;
}
ps = p2.ToString();
//if(p2 % 12 == 11)
//{
// textBox1_SetText("Safe-ish Prime = " + ps);
//}
if (p2 - p1 == 2)
{
textBox1_SetText("Twin Prime (p+2) = " + ps);
}
p1 = p2;
}
p2 += 2;
}
}
PrimeTest() was a Rabin-Miller prime test but it was too slow so I'm doing a simple Fermat test at bases 2,3,5,7 and 11:
BigInteger.PowerMod(2,p-1,p)==1 And BigInteger.PowerMod(3,p-1,p)==1 And .. And BigInteger.PowerMod(11,p-1,p)==1
At 1023 bits, that's plenty, I haven't seen a liar for base 2 at that level yet.
I'll give you the first three for free (no twins so far):
Sophie Germain = 179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329624225795083
Sophie Germain = 179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329624227077847
Sophie Germain = 179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329624227998859
EDIT: Fixed a bug that suppressed twin primes.