http://projecteuler.net/index.php?section=problems&id=123

そのまま。

import Number
import Data.List
import Control.Monad
main =print.liftM (+1).findIndex (>10^10). zipWith remainder primes$ [1..]
where remainder p n | odd n = 2*n*p `mod` (p*p)
| even  n = 2