let power_two = let h = Hashtbl.create 7 in fun k -> try Hashtbl.find h k with Not_found -> let p = Big_int.power_int_positive_int 2 k in Hashtbl.add h k p; p