Problem 12
Clojure
1(ns problem12.core)
2
3(defn num-of-divisors [n]
4 (* 2 (count (filter #(= (mod n %) 0) ( range 2 (+ (int (Math/sqrt n)) 1) ) ) ) ))
5
6(defn -main
7 []
8 (println (first (filter #(> (num-of-divisors % ) 500) (map #(reduce + (range %)) (range))))))