Question: How to write a proc for determining primes with a particular propery

Requesting a procedure to calculate primes p for which there exists a prime q <= p such that pi(p)=q-pi(q), where pi is the prime counting function. If possible options to select output as p, or as (p,q).

p list starts:2,13,17,29,31,43.....

q list starts: 2,11,13,17,19,23...

Thanks in advance,

David.

Please Wait...