login
A139775
Primes p2 such that p1^2 + p2^3 and p1^3 + p2^2 are averages of twin primes. p1 and p2 consecutive primes, p1 < p2.
1
29, 210071, 10480889, 10526501, 11210333, 11722901, 12252269, 12334121, 13647089, 15550421, 23652539, 26724479, 31165139, 48668111, 50599841, 51412019, 56699039, 80672393, 82804769, 90962141, 104066489, 109197419, 109953803, 120560879, 127503119, 153189503, 161933327
OFFSET
1,1
LINKS
EXAMPLE
p2 = 29 is a term since the previous prime is p1 = 23, and both 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, p2]], {n, 13^5}]; Print[a];
chkQ[{a_, b_}]:=Module[{c=a^2+b^3, d=a^3+b^2}, AllTrue[{c+1, c-1, d+1, d-1}, PrimeQ]]; Transpose[Select[Partition[ Prime[Range[ 3000000]], 2, 1], chkQ]][[2]] (* The program uses the AllTrue function from Mathematica version 10. *) (* Harvey P. Dale, Nov 25 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Harvey P. Dale, Nov 25 2014
More terms from Amiram Eldar, Jan 02 2020
STATUS
approved