;; Problem 63 : 2011/11/17 ;; "Elapsed time: 1.326705 msecs" (require '[clojure.contrib.math :as math]) (defn digits-of-pow [x n] (count (str (math/expt x n)))) (defn pe63 [] (for [x (range 1 10)] (count (take-while #(= (first %) (last %)) (map #(vector % (digits-of-pow x %)) (iterate inc 1))))))