Generating primes in LaTeX: by Knuth and sieving