(defn van-der-corput
  "Get the nth element of the van der Corput sequence."
  ([n]
   
   (van-der-corput n 2))
  ([n base]
   (let [s (/ 1 base)]  
     
     
     
     (loop [sum 0
            n n
            scale s]
       (if (zero? n)
         sum  
         (recur (+ sum (* (rem n base) scale))  
                (quot n base)                   
                (* scale s)))))))               

(clojure.pprint/print-table
  (cons:base (range 10))  
  (for [base (range 2 6)]  
    (into {:base base}
          (for [n (range 10)]  
            [n (van-der-corput n base)]))))