A187400 Semiprimes with a semiprime average of the two factors.
15, 35, 51, 65, 77, 91, 115, 123, 141, 161, 185, 187, 201, 209, 219, 221, 235, 259, 267, 301, 305, 321, 339, 341, 355, 365, 377, 381, 403, 413, 427, 437, 451, 453, 481, 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
Offset: 1
Keywords
Examples
The semiprime 187 = 11*17 is in the sequence, because the average (11+17)/2 = 14 = 2*7 is semiprime. The semiprime 267 = 3*89 is in the sequence because the average (3+89)/2 = 46 = 2*23 is semiprime.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
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]]
-
PARI
sopf(n)= { local(f, s=0); f=factor(n); for(i=1, matsize(f)[1], s+=f[i, 1]); return(s) } averg(n)={local(s); s=sopf(n)/omega(n);return(s)} { for (n=4, 10^3, m=averg(n);if(bigomega(n)==2,if(m==floor(m)&&bigomega(m)==2,print1(n, ", ")))) } \\ Antonio Roldán, Oct 15 2012
-
PARI
list(lim)=my(v=List()); forprime(p=3,lim\3, forprime(q=3,min(p-2,lim\p), if(bigomega((p+q)/2)==2, listput(v,p*q)))); Set(v) \\ Charles R Greathouse IV, Oct 16 2014
Comments