login
A173996
Primes p such that both (p-1)*(p-2) and (p+1)*(p+2) are averages of twin prime pairs.
1
5, 7, 23, 161957, 180287, 484153, 496123, 610633, 799223, 805523, 1466747, 1489507, 1562983, 1857287, 2331887, 2398223, 2550203, 2599847, 2728703, 3562043, 3752093, 4094743, 4366847, 4451743, 4914653, 5137547, 5378497, 6305857, 6709057, 6718763, 6797933, 6930037
OFFSET
1,1
LINKS
EXAMPLE
5 is a term since (5-1)*(5-2) = 4*3 = 12 and (5+1)*(5+2) = 6*7 = 42 are averages of the twin prime pairs (11, 13) and (41, 43).
7 is a term since (7-1)*(7-2) = 6*5 = 30 and (7+1)*(7+2) = 8*9 = 72 are averages of the twin prime pairs (29, 31) and (71, 73).
MATHEMATICA
f[n_]:=PrimeQ[(n-1)*(n-2)-1]&&PrimeQ[(n-1)*(n-2)+1]&&PrimeQ[(n+1)*(n+2)-1]&&PrimeQ[(n+1)*(n+2)+1]; lst={}; Do[p=Prime[n]; If[f[p], AppendTo[lst, p]], {n, 9!}]; lst
Select[Prime[Range[475000]], AllTrue[{(#-1)(#-2)-1, (#-1)(#-2)+1, (#+1) (#+2)- 1, (#+1)(#+2)+1}, PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 14 2020 *)
CROSSREFS
Cf. A014574.
Sequence in context: A121605 A226657 A229021 * A024864 A025108 A298900
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Amiram Eldar, Dec 22 2019
STATUS
approved