<div dir="ltr"><div>I succeeded to get it working with n = 2,000,000 at least, through this means:<br><br>primesBelow :: Int -> [Int]<br>primesBelow max = list<br>  where list = 2:3:rest<br>        rest = [ v | k <- [1..(max-1)`div`6], i <- [-1, 1]<br>                       , let v = 6*k+i, checker v]<br>        ...<br>        ...<br><br></div>the function "checker" (in the list comprehension, as conditional) is using itself in its definition the variable "list" to generate the test for each "v" of the list comprehension "rest". I dunno if this kind of recursion suits you.<br></div>