OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..120
EXAMPLE
24918 is a term since p1 = 23 and p2 = 29 are consecutive primes such that p1^2 + p2^3 = 24918 and p1^3 + p2^2 = 13008 are averages of twin primes.
MATHEMATICA
a={}; Do[p1=Prime[n]; p2=Prime[n+1]; p3=p1^2+p2^3; p4=p1^3+p2^2; If[PrimeQ[p3-1]&&PrimeQ[p3+1]&&PrimeQ[p4-1]&&PrimeQ[p4+1], AppendTo[a, p3]], {n, 13^5}]; Print[a];
PROG
(PARI) testA139776(p, q)={my(p3=p^2+q^3, p4=p^3+q^2); ispseudoprime(p3-1)&&ispseudoprime(p3+1)&&ispseudoprime(p4-1)&&ispseudoprime(p4+1)} p=3; forprime(q=5, 1e7, if(testA139776(p, q), print1(p^2+q^3", ")); p=q)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 16 2008
EXTENSIONS
Program and more terms from Charles R Greathouse IV Jul 27 2009
STATUS
approved