Prime numbers p for which the sum of primes less than or equal to p is prime: Difference between revisions

Realize in F#
(→‎{{header|ALGOL 68}}: Remove extraneous blank line)
(Realize in F#)
Line 85:
</pre>
 
=={{header|F_Sharp|F#}}==
This task uses [http://www.rosettacode.org/wiki/Extensible_prime_generator#The_functions Extensible Prime Generator (F#)]
<lang fsharp>
// Primes (+)2..p is prime. Nigel Galloway: July 7th., 2021
primes32()|>Seq.takeWhile((>)1000)|>Seq.scan(fun(n,_) g->(n+g,g))(0,0)|>Seq.filter(fun(n,_)->isPrime n)|>Seq.iter(fun(_,n)->printf "%d " n); printfn ""
</lang>
=={{header|Factor}}==
{{works with|Factor|0.99 2021-06-02}}
2,171

edits