The sieve of Sundaram: Difference between revisions
m
no edit summary
mNo edit summary |
|||
Line 1:
{{draft task}}
The sieve of
Starting with the ordered set of +ve integers, mark every third starting at 4 (4;7;10...).
Line 18:
Using your function find and output the first 100 and the millionth Sundaram prime.
The faithless amongst you may compare the results with those generated by The sieve of
=={{header|F_Sharp|F#}}==
<lang fsharp>
// The sieve of
let sPrimes()=
let sSieve=System.Collections.Generic.Dictionary<int,(unit -> int) list>()
Line 33:
sPrimes()|>Seq.take 100|>Seq.iter(printf "%d "); printfn ""
printfn "The millionth
</lang>
{{out}}
|