Project Euler Problem 27

Project Euler Problem 27 asks us to find the coefficients of a formula that will produce as many prime numbers as possible for consecutive integer values that are inputs.

A brute force approach is concise and all we need to solve the problem. See problem 7 for the definition of lazy-primes-cgrande.

(def primes (lazy-primes-cgrande))

(defn prime? [n]
(not-any? #(zero? (rem n %)) (take-while #(<= (* % %) n) primes)))

(* a b)))