OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (first 100 terms from Lava)
EXAMPLE
2 prime, 3 next-prime and 2*3 + 2 - 3 = 5 prime, 2*3 - 2 + 3 = 7 next-prime, so a(1) = 2.
MATHEMATICA
acpQ[{p_, q_}]:=Module[{c=p*q+p-q}, PrimeQ[c]&&NextPrime[c]==p*q-p+q]; Select[ Partition[Prime[Range[15000]], 2, 1], acpQ][[All, 1]] (* Harvey P. Dale, Oct 09 2017 *)
PROG
(PARI) p=2; forprime(q=3, 1e6, my(pq=p*q); if(isprime(pq+p-q) && nextprime(pq+p-q+1)==pq-p+q, print1(p", ")); p=q) \\ Charles R Greathouse IV, Mar 18 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Irina Gerasimova, May 13 2013
EXTENSIONS
Added a(5), a(6) and a(20)-a(39) by Paolo P. Lava, May 14 2013
STATUS
approved