initial commit

This commit is contained in:
2025-08-03 20:16:55 -07:00
commit 87a130499d
89 changed files with 10241 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
module _27
open System
let quadraticConsecutivePrimes =
let range = [-1000..1000]
let isPrime = common.isPrimeFunByMax 100000
let primeLength f =
common.allIntegers
|> Seq.map f
|> Seq.takeWhile isPrime
|> Seq.length
let abs = common.crossMap (fun a b -> (a,b)) range range
let quadradic (a,b) n =
n*n + a*n + b
abs
|> Seq.map (fun ab -> (ab, ab |> (quadradic >> primeLength)))
|> Seq.maxBy snd
|> (fun ((a,b),_)-> a * b)