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
+17
View File
@@ -0,0 +1,17 @@
module _12
open System
let fiveDivisorTriangle =
let root (n : int) = int( Math.Sqrt(float(n)) )
// observation: if number has a factor < sqrt(num), then it has a corresponding
// factor > sqrt(num)
let factorCount x = Seq.sum (seq { for i = 1 to root x do if x % i = 0 then yield 2 })
let result =
(1, 0) |> Seq.unfold (fun (num,acc) ->
Some(num + acc, (num + 1, num + acc)))
|> Seq.filter (fun x ->
let factCount = factorCount x
factCount >= 500 )
|> Seq.head
result