TITLE: Generating random numbers with the distribution of the primes
QUESTION [7 upvotes]: I would like to generate random numbers whose distribution mimics that of the primes.
So the number of generated random numbers less than $n$ should grow like $n / \log n$,
most intervals $[n,n+n^\epsilon]$ should contain approximately $n^\epsilon / \log n$
generated numbers (Selberg's short intervals), etc.  Does anyone know of a computationally feasible method for generating such "look-a-like primes"?
Addendum. I implemented Henry and Xoff's suggestions.
Here are several instances of the first ten "pseudoprimes":
$$ 4, 5, 9, 10, 17, 23, 27, 28, 31, 44 $$
$$ 7, 8, 9, 10, 12, 15, 18, 19, 27, 34 $$
$$ 6, 11, 15, 16, 23, 26, 27, 29, 45, 49 $$
And here is the cumulative distribution pseudoprimes up to $10^6$ (red), together with 
a plot of $n / \log n$ (purple), for one random run:

REPLY [4 votes]: Not sure if this fits the bill, but how about the following process.
Since the (normal) primes can be generated by a sieve (sieve out all multiples of 2, then 3, then 5, etc.), how about using a similar sieving process, but choose a random offset for each run through the sieving process?
For example, first sieve out every second number starting randomly with 1 or 2.
Then sieve out all multiples of 3 starting randomly at 1, 2 or 3.
Repeat until you get to the square root of the limit you want to go up to.
Since the standard Eratosthenes sieve is pretty fast when it gets going, this might be a good process if you want a reasonable-sized block of "primes".