%I
%S 15,35,51,65,77,91,115,123,141,161,185,187,201,209,219,221,235,259,
%T 267,301,305,321,339,341,355,365,377,381,403,413,427,437,451,453,481,
%U 485,497,501,537,545,589,649,667,681,689,699,717,721,723,737,745,749,763,789,835,843,849,893,901,905
%N Semiprimes with a semiprime average of the two factors.
%C The definition is similar to A115585, but considering the arithmetic mean, not the sum of the factors.
%C Even semiprimes, A100484, are not in the sequence, because (with the exception of 4) the average of their factors is not an integer.
%H Alois P. Heinz, <a href="/A187400/b187400.txt">Table of n, a(n) for n = 1..1000</a>
%e The semiprime 187=11*17 is in the sequence, because the average (11+17)/2=14 = 2*7 is semiprime.
%e The semiprime 267=3*89 is in the sequence because the average (3+89)/2=46=2*23 is semiprime.
%t semiPrimeQ[n_] := Total[FactorInteger[n]][[2]] == 2; Reap[Do[{p, e} = Transpose[FactorInteger[n]]; If[Total[e] == 2 && semiPrimeQ[Total[p]/2], Sow[n]], {n, 1000}]][[2, 1]]
%o (PARI)sopf(n)= { local(f, s=0); f=factor(n); for(i=1, matsize(f)[1], s+=f[i, 1]); return(s) }
%o averg(n)={local(s); s=sopf(n)/omega(n);return(s)}
%o { for (n=4, 10^3, m=averg(n);if(bigomega(n)==2,if(m==floor(m)&&bigomega(m)==2,print1(n, ", ")))) }
%o // Antonio Roldán, Oct 15 2012
%o (PARI) list(lim)=my(v=List()); forprime(p=3,lim\3, forprime(q=3,min(p2,lim\p), if(bigomega((p+q)/2)==2, listput(v,p*q)))); Set(v) \\ _Charles R Greathouse IV_, Oct 16 2014
%Y Cf. A001358.
%K nonn
%O 1,1
%A _Antonio Roldán_, Mar 09 2011
