\\ Generation of primes in pari \\ The first numprimes primes numprimes=20000; \\ List of primes primelist=vector(numprimes); \\ Last found multiple of corresponding prime multiples=vector(numprimes); \\ First candidate prime (priming the prime list!) candidate=2; found=0; \\ Where the squares in the list start \\ To begin with all are "virtual" squares \\ (i.e. will be initialised to be squares) squarestart=1; \\ Using Eratosthenes sieve sieve(n)= { local(i,c); i=1;c=0; while(i