improve emirp generator

I'm looking for emirps of a specific type where the emirp are also
center squared primes (prime == sum of 2 consecutive whole numbers
squared). For instance:

12641 <====> 14621 is an emirp and:

12641 = 79^2 + 80^2
14621 = 85^2 + 86^2 are both center squared

I've written this code to generate emirp candidates but it is slow
and I have reached the limit of my c skills. I would appreciate
any help/suggestions/guideance on improving my program or trying a
better whole new approach. thanks

Re: improve emirp generator

Posted 09 October 2012 - 09:54 PM

Hello Jim

on my computer an 8 yr. old toshiba p4 laptop it took 22m41.497s with MAX_RANGE set at 1,000,000,000.
I lowered MAX_RANGE to 1,000,000 for testing and that's what it is in the post. Sorry, I should have
pointed that out.

I just found a prime check algorithm on the snippets page of this site posted by retardedgenius that
is way faster than mine and I'm testing that right now.