All squarefree semiprime numbers that less than a certain number How can i find all number $N$, where $N=p*q$. (Here, $p$ and $q$ are primes and $p<q$) ?
For example: I want a formula that help me to find all $N<1000$ 

Apply the sieve of sundaram's logic, $$(2a+1)(2b+1)=2(2ab+a+b)+1$$ one of $a,b$ must  less than 16, because if not $a=b$ gives $$4a^2+4a+1>1000$$  Then applying it again you'll need $c$ less than 3, because you can sieve out all values that would not create primes in the product.  Finally you would double all primes less than 500. 
