You can try translating this in efficient, readable and short D2 code using Phobos2 (the purpose is to find spots where Phobos2 may need improvements): http://rosettacode.org/wiki/Hamming_numbers#Haskell
Haskell version: hamming = 1 : map (2*) hamming `merge` map (3*) hamming `merge` map (5*) hamming where merge (x:xs) (y:ys) | x < y = x : xs `merge` (y:ys) | x > y = y : (x:xs) `merge` ys | otherwise = x : xs `merge` ys main = do print $ take 20 hamming print $ hamming !! 1690 print $ hamming !! 1000000 (There's also a good enough Python version in that page). Bye, bearophile