user
A prime number *p* is a Sophie Germain prime if 2*p* + 1 is also prime.  
The number 2*p* + 1 associated with a Sophie Germain prime is called a **safe prime**.

Task

Generate the first   **50**   Sophie Germain prime numbers.

See also

* Wikipedia: Sophie Germain primes * OEIS:A005384 - Sophie Germain primes * Related Task: Safe\_primes\_and\_unsafe\_primes
assistant
```
put join "\n", (^∞ .grep: { .is-prime && ($_*2+1).is-prime } )[^50].batch(10)».fmt: "%4d";

```

Output:

```
   2    3    5   11   23   29   41   53   83   89
 113  131  173  179  191  233  239  251  281  293
 359  419  431  443  491  509  593  641  653  659
 683  719  743  761  809  911  953 1013 1019 1031
1049 1103 1223 1229 1289 1409 1439 1451 1481 1499
```