%I #17 Sep 08 2022 08:45:39
%S 5,17,19,59,61,191,227,521,641,683,709,857,863,919,983,1031,1039,1097,
%T 1117,1123,1151,1229,1423,1543,1579,1621,1699,1733,1759,1867,1871,
%U 2153,2237,2287,2357,2383,2557,2621,2879,2971,3301,3329,3371,3581,3847,4021
%N Primes p such that p^2 - 48 and p^2 + 48 are also primes.
%t fQ[n_]:=PrimeQ[n^2-48]&&PrimeQ[n^2+48];lst={};Do[If[fQ@Prime[n],AppendTo[lst,Prime[n]]],{n,7!}];lst
%t Select[Prime[Range[PrimePi[4500]]],AllTrue[#^2+{48,-48},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Dec 08 2015 *)
%o (Magma) [p: p in PrimesUpTo(5000)|IsPrime(p^2-48) and IsPrime(p^2+48)] // _Vincenzo Librandi_, Jan 30 2011
%Y Cf. A153116, A153119, A153120, A153321.
%K nonn
%O 1,1
%A _Vladimir Joseph Stephan Orlovsky_, Dec 23 2008