OFFSET
1,1
COMMENTS
2*3-1=5;2*3+1=7, 3*5-2=13;3*5+2=17, ...
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..200
MAPLE
with(numtheory); A154553:=proc(q) local a, b, n;
for n from 42676 to q do a:=ithprime(n); b:=nextprime(a);
if isprime(a*b+a-b) and isprime(a*b-a+b) then print(a);
fi; od; end: A154553(10^9); # Paolo P. Lava, May 14 2013
MATHEMATICA
lst={}; Do[p=Prime[n]; pn=Prime[n+1]; d=pn-p; If[PrimeQ[p*pn-d]&&PrimeQ[p*pn+d], AppendTo[lst, p]], {n, 8!}]; lst
pnQ[{p_, q_}]:=And@@PrimeQ[{p*q+p-q, p*q-p+q}]; Transpose[Select[ Partition[ Prime[Range[4000]], 2, 1], pnQ]][[1]] (* Harvey P. Dale, Jul 12 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jan 11 2009
EXTENSIONS
Edited by Omar E. Pol, Jan 12 2009
STATUS
approved