%I #7 Nov 20 2020 19:08:59
%S 110,130,430,442,470,670,782,790,890,970,1222,1310,1358,1462,1582,
%T 1670,1898,1978,2338,2410,2510,3082,3170,3478,3970,4090,4430,4718,
%U 4982,5402,5410,5542,5678,6298,7390,7582,7918,7922,8570,8878,9062,9178,9682,9698
%N Numbers that are the product of 3 distinct primes a,b and c, such that a^2+b^2+c^2 is the average of a twin prime pair.
%C One of the three primes must be 2. - _Robert Israel_, Apr 09 2019
%H Robert Israel, <a href="/A176879/b176879.txt">Table of n, a(n) for n = 1..10000</a>
%e 110=2*5*11; 2^2+5^2+11^2=150+-1 -> primes
%p N:= 10000: # to get terms <= N
%p P:= select(isprime, [seq(i,i=5..N/10,2)]): nP:= nops(P):
%p Res:= NULL:
%p for i from 1 to nP do
%p a:= P[i];
%p for j from i+1 to nP do
%p b:= P[j];
%p if 2*a*b > N then break fi;
%p q:= 4+a^2 + b^2;
%p if isprime(q-1) and isprime(q+1) then Res:= Res, 2*a*b; fi;
%p od
%p od:
%p sort([Res]); # _Robert Israel_, Apr 09 2019
%t l[n_]:=Last/@FactorInteger[n]; f[n_]:=First/@FactorInteger[n]; lst={};Do[If[l[n]=={1,1,1},a=f[n][[1]];b=f[n][[2]];c=f[n][[3]];If[PrimeQ[a^2+b^2+c^2-1]&&PrimeQ[a^2+b^2+c^2+1],AppendTo[lst,n]]],{n,8!}];lst
%t With[{nn=2000},Select[Union[2Times@@#&/@Select[Subsets[Prime[Range[2,nn]],{2}],AllTrue[Total[#^2]+4+{1,-1},PrimeQ]&]],#<=6nn&]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Nov 20 2020 *)
%Y Cf. A006881, A014574, A176875, A176876, A176877, A176878
%K nonn
%O 1,1
%A _Vladimir Joseph Stephan Orlovsky_, Apr 27 2010