Question: Number of primes

I'm trying to write a code that does the following...
 

It takes a polynomial of the form a*x + b*x + c and cycles through vales of x from say, 1 to 100 then tells me how many primes i get. But what i want to do is start with x + x + 1 and then do x + x + 2.. etc for values of a,b,c from again, 1-100.

The following code will print all polys of the form a*x + b*x + c for a,b,c from 1-100.

for a to 100 do

for b to 100 do

for c to 100 do

print(a*x + b*x + c)

end do

end do

end do;

And the way i would like the output to be would be something like...

x, n (where n is the number of primes)

Is there anyway to edit this so that it does what i want?

Please Wait...