Proper divisors: Difference between revisions
Content deleted Content added
Line 1,218: | Line 1,218: | ||
[1..10] |> List.iter (propDivDat >> show) |
[1..10] |> List.iter (propDivDat >> show) |
||
// use a sequence: we don't really need to hold this data, just |
// use a sequence: we don't really need to hold this data, just iterate over it |
||
Seq.init 20000 ( ((+) 1) >> propDivDat) |
Seq.init 20000 ( ((+) 1) >> propDivDat) |
||
|> Seq.fold (fun a b ->match a,b with | (_,c1,_),(_,c2,_) when c2 > c1 -> b | _-> a) (0,0,[]) |
|> Seq.fold (fun a b ->match a,b with | (_,c1,_),(_,c2,_) when c2 > c1 -> b | _-> a) (0,0,[]) |