Strange unique prime triplets: Difference between revisions
Content added Content deleted
Line 2,407: | Line 2,407: | ||
=={{header|Scala}}== |
=={{header|Scala}}== |
||
Scala3 ready |
|||
<syntaxhighlight lang="scala"> |
<syntaxhighlight lang="scala"> |
||
val primeStream5 = LazyList.from(5, 6) |
val primeStream5 = LazyList.from(5, 6) |
||
Line 2,437: | Line 2,438: | ||
} |
} |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
{{out}} |
|||
<pre> |
|||
3 + 5 + 11 = 19 |
|||
3 + 5 + 23 = 31 |
|||
3 + 5 + 29 = 37 |
|||
3 + 7 + 13 = 23 |
|||
3 + 7 + 19 = 29 |
|||
3 + 11 + 17 = 31 |
|||
3 + 11 + 23 = 37 |
|||
3 + 11 + 29 = 43 |
|||
3 + 17 + 23 = 43 |
|||
5 + 7 + 11 = 23 |
|||
5 + 7 + 17 = 29 |
|||
5 + 7 + 19 = 31 |
|||
5 + 7 + 29 = 41 |
|||
5 + 11 + 13 = 29 |
|||
5 + 13 + 19 = 37 |
|||
5 + 13 + 23 = 41 |
|||
5 + 13 + 29 = 47 |
|||
5 + 17 + 19 = 41 |
|||
5 + 19 + 23 = 47 |
|||
5 + 19 + 29 = 53 |
|||
7 + 11 + 13 = 31 |
|||
7 + 11 + 19 = 37 |
|||
7 + 11 + 23 = 41 |
|||
7 + 11 + 29 = 47 |
|||
7 + 13 + 17 = 37 |
|||
7 + 13 + 23 = 43 |
|||
7 + 17 + 19 = 43 |
|||
7 + 17 + 23 = 47 |
|||
7 + 17 + 29 = 53 |
|||
7 + 23 + 29 = 59 |
|||
11 + 13 + 17 = 41 |
|||
11 + 13 + 19 = 43 |
|||
11 + 13 + 23 = 47 |
|||
11 + 13 + 29 = 53 |
|||
11 + 17 + 19 = 47 |
|||
11 + 19 + 23 = 53 |
|||
11 + 19 + 29 = 59 |
|||
13 + 17 + 23 = 53 |
|||
13 + 17 + 29 = 59 |
|||
13 + 19 + 29 = 61 |
|||
17 + 19 + 23 = 59 |
|||
19 + 23 + 29 = 71 |
|||
number of prime triplets up to 30 is 42 [time(ms): 2] |
|||
number of prime triplets up to 1000 is 241580 [time(ms): 1271] |
|||
</pre> |
|||
=={{header|Sidef}}== |
=={{header|Sidef}}== |