initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
module _45
|
||||
|
||||
let triPentHex =
|
||||
let limit = 100000
|
||||
let opDict (op : int -> bigint) =
|
||||
[1..limit]
|
||||
|> Seq.map (fun n -> (op n, n))
|
||||
|> dict
|
||||
|
||||
let p = opDict common.pentagonalNumber
|
||||
let h = opDict common.hexagonalNumber
|
||||
|
||||
common.allIntegers
|
||||
|> Seq.skip 284
|
||||
|> Seq.map (fun i -> (common.triangleNumber i, i))
|
||||
|> Seq.filter (fst >> (fun t -> p.ContainsKey(t) && h.ContainsKey(t)))
|
||||
|> Seq.map (fun t -> (snd t, p.Item(fst t), h.Item(fst t), fst t))
|
||||
|> Seq.take 2
|
||||
Reference in New Issue
Block a user