> 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_squares_n_where_n_1_is_prime.md).

# Find squares n where n 1 is prime

```ruby
1..1000.isqrt -> map { _**2 }.grep { is_prime(_+1) }.say
```

#### Output:

```
[1, 4, 16, 36, 100, 196, 256, 400, 576, 676]
```
