  A classical result in number theory is Dirichlet's theorem on the density of
primes in an arithmetic progression. We prove a similar result for numbers with
exactly k prime factors for k>1. Building upon a proof by E.M. Wright in 1954,
we compute the natural density of such numbers where each prime satisfies a
congruence condition. As an application, we obtain the density of squarefree n
not greater than x with k prime factors such that a fixed quadratic equation
has exactly 2^k solutions modulo n.
