Problem 45 euler, includes tri(), pent() and hex() functions