rediculous speedup on euler problem 12 using prime factors and a little more memory, in OCaml