OFFSET
1,1
COMMENTS
Sophie Germain primes are primes p such that 2p+1 is also prime.
EXAMPLE
The first four primes are 2, 3, 5 and 7. Three of these are Sophie Germain primes (since 2*2 + 1 = 5, 2*3 + 1 = 7 and 2*5 + 1 = 11 are prime, but 2*7 + = 15). Therefore the second value in the sequence is 3.
MATHEMATICA
<< NumberTheory`NumberTheoryFunctions` cnt = 0; currentPrime = 1; For[ i = 1, i == i, i ++, currentPrime = NextPrime[ currentPrime ]; If[ PrimeQ[ 2*currentPrime + 1 ], cnt++ ]; If[ IntegerQ[ Log[ 2, i ] ], Print[ cnt ] ]; ]
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander D. Healy, Mar 19 2001
STATUS
approved