(ns example
  (:gen-class))


(def primes (iterate #(.nextProbablePrime %) (biginteger 2)))

(defn primorial-prime? [v]
  " Test if value is a primorial prime "
  (let [a (biginteger (inc v))
        b (biginteger (dec v))]
    (or (.isProbablePrime a 16)
      (.isProbablePrime b 16))))


(println (take 20 (keep-indexed                                 
                          #(if (primorial-prime? %2) (inc %1))  
                          (reductions *' primes))))