> 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/d/double_twin_primes.md).

# Double Twin Primes

```ruby
1000.primes.each_cons(4, {|*a|
    if (a.diffs == [2, 4, 2]) {
        say a
    }
})
```

#### Output:

```
[5, 7, 11, 13]
[11, 13, 17, 19]
[101, 103, 107, 109]
[191, 193, 197, 199]
[821, 823, 827, 829]
```
