Help


from Wikipedia
« »  
A Sophie Germain prime p > 3 is of the form 6k − 1 or, equivalently, p ≡ 5 ( mod 6 ) — as is its matching safe prime 2p + 1.
We note that the other form for a prime p > 3 is 6k + 1 or, equivalently, p ≡ 1 ( mod 6 ), and that 3 |( 2p + 1 ) — thus excluding such p from the Sophie Germain prime domain.
This is trivially proven using modular arithmetic.

2.151 seconds.