OFFSET
1,1
COMMENTS
Note that Q-P=3(q-p).
No common terms with A181848.
LINKS
Zak Seidov, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1)=47 because p=47, q=53 and {P=41,Q=59} are both prime.
MATHEMATICA
a = 2; Reap[ Do[b = Prime[n]; If[PrimeQ[2*a - b] && PrimeQ[2*b - a], Sow[a]]; a = b, {n, 2, 1000}]][[2, 1]]
Transpose[Select[Partition[Prime[Range[2500]], 2, 1], AllTrue[{2#[[1]]- #[[2]], 2#[[2]]-#[[1]]}, PrimeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 14 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Aug 18 2012
STATUS
approved