Basic number theory stuff in Clojure.