title: Implement Goldbach's conjecture in Haskell
body: <p>So Goldbach's conjecture says that every positive even number greater than 2 is the sum of two prime numbers. I am trying to write a Haskell program that will, given a positive even integer, find those 2 prime numbers:</p>
  
  <pre><code>goldbach n = head [(x,y) | x &lt;- primesR 2 (n-1),
                             let y = n-x-1, isPrime y]
  </code></pre>
  
  <p>Where <code>primesR</code> is given below as (returns primes in range):</p>
  
  <pre><code>primesR :: Integral a =&gt; a -&gt; a -&gt; [a]
  primesR a b = takeWhile (&lt;= b) $ dropWhile (&lt; a) $ sieve [2..]
    where sieve (n:ns) = n:sieve [ m | m &lt;- ns, m `mod` n /= 0 ]
  </code></pre>
  
  <p>However, this doesn't consistently give me the correct prime numbers. I think my indexing is off but I'm not sure how/where?</p>