login
A153379
Larger of two consecutive prime numbers, p1 and p2 = p1 + d, such that p1*p2*d - d is the average of twin primes.
13
1193, 8923, 13997, 31847, 33113, 56039, 57593, 66593, 85843, 87803, 90583, 91229, 93503, 101323, 103183, 111697, 113123, 127453, 141403, 142897, 150373, 150413, 151673, 152623, 156823, 157133, 161983, 176849, 179743, 186013, 205963, 209431
OFFSET
1,1
LINKS
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
EXTENSIONS
Name edited by Amiram Eldar, Jan 03 2020
STATUS
approved