OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
1193 since 1187 and 1193 = 1187 + 6 are consecutive primes, 1187*1193*6 - 6 = 8496540, and (8496539, 8496541) are twin primes.
MATHEMATICA
lst={}; Do[p1=Prime[n]; p2=Prime[n+1]; d=p2-p1; a=p1*p2*d-d; If[PrimeQ[a-1]&&PrimeQ[a+1], AppendTo[lst, p2]], {n, 8!}]; lst
l2cpQ[{a_, b_}]:=Module[{d=b-a}, AllTrue[a*b*d-d+{1, -1}, PrimeQ]]; Transpose[ Select[ Partition[Prime[Range[20000]], 2, 1], l2cpQ]][[2]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 18 2015 *)
PROG
(Magma) [q:p in PrimesUpTo(210000)| IsPrime(a-1) and IsPrime(a+1) where a is (p*q-1)*(q-p) where q is NextPrime(p)]; // Marius A. Burtea, Jan 03 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Dec 24 2008
EXTENSIONS
Name edited by Amiram Eldar, Jan 03 2020
STATUS
approved