Cohen’s sieve with quadratic conditions - McNay, Gavin (Utilitas Mathematica, 1996)
..