Ten primes, each less than 3000, form an arithmetic progression. Find them.
(In reply to Well...
by ed bottemiller)
You haven't posted your program, but I assume it does what you said: "Check the primes from 3 up, and the even increments which could be added 9 times without exceeding 3000. " That's not exactly what my program did. I checked the C(429,2)=91806 pairs of primes, checked to see if any given one was separated by a multiple of 9 and if so, checked the intervening ones for primality. The procedure quoted above would check 429 times an average of about 200 sequences for primality (about 80,000), while my program needed to check only about 10,000. (It actually checked 14,710 sequences--the ones where the starting and ending primes were a multiple of 9-- to see if their members are all prime.)
Posted by Charlie
on 2008-10-01 11:10:14