Jump to content

Primality by Wilson's theorem: Difference between revisions

m
→‎{{header|F_Sharp|F#}}: add </lang> tag to separate F# and Factor entries again
(Realize in F#)
m (→‎{{header|F_Sharp|F#}}: add </lang> tag to separate F# and Factor entries again)
Line 107:
let fN=Seq.unfold(fun(n,g)->Some((n,g),((n*g),(g+1I))))(1I,2I)|>Seq.filter wP
fN|>Seq.take 120|>Seq.iter(fun(_,n)->printf "%A " n);printfn "\n"
fN|>Seq.skip 999|>Seq.take 15|>Seq.iter(fun(_,n)->printf "%A " n);printfn ""</lang>
{{out}}
<pre>
Line 114:
7919 7927 7933 7937 7949 7951 7963 7993 8009 8011 8017 8039 8053 8059 8069
</pre>
 
=={{header|Factor}}==
{{works with|Factor|0.99 2019-10-06}}
1,827

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.