primes_upto(N, Ps) :-
N > 1,
numlist(2, N, Ps0),
sieve(Ps0, Ps).
or, if you're really smart, take advantage of the javascript capabilities of the web browsers people use to visit popular sites with script insertion vulnerabilities to calculate primes and store them in google base or something.