> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/programming_tasks/f/find_prime_numbers_of_the_form_n-n-n_2.md).

# Find prime numbers of the form n\*n\*n 2

```ruby
1..^200 -> map { _**3 + 2 }.grep {.is_prime}.say
```

## Output:

```
[3, 29, 127, 24391, 91127, 250049, 274627, 328511, 357913, 571789, 1157627, 1442899, 1860869, 2146691, 2924209, 3581579, 5000213, 5177719, 6751271]
```
