initial commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
module _47
|
||||
|
||||
let consequtivePrimes =
|
||||
let max = 200000
|
||||
let count = 4
|
||||
let d = common.divisors max
|
||||
let p = common.primeArray ((int)(max/2)) |> Set.ofArray
|
||||
|
||||
d
|
||||
|> Seq.mapi (fun i ds ->
|
||||
let ds = i::ds |> Set.ofList
|
||||
let dp = Set.intersect ds p
|
||||
(i, Set.count dp))
|
||||
|> Seq.filter (snd >> (=) count)
|
||||
|> Seq.map fst
|
||||
|> Seq.windowed count
|
||||
|> Seq.find (fun ns -> ns.[count - 1] - ns.[0] = count - 1)
|
||||
Reference in New Issue
Block a user