OFFSET
0,4
COMMENTS
Can it be proved that a(n)>0 for n>1?
Chen proves that there is a semiprime between n^2 and (n+1)^2 for sufficiently large n. - T. D. Noe, Oct 17 2008
REFERENCES
Jing Run Chen, On the distribution of almost primes in an interval, Sci. Sinica 18 (1975), 611-627.
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1000
EXAMPLE
The first semiprimes are 6,10,14,15,21,22,26. None are <4, hence a(0)=a(1)=0.
One only is < 9, hence a(2) = 1.
Three more, 10, 14, 15 are < 16, hence a(3)=3.
MATHEMATICA
SemiPrimeQ[n_] := TrueQ[Plus@@Last/@FactorInteger[n]==2]; Table[Length[Select[Range[n^2+1, n^2+2n], SemiPrimeQ]], {n, 0, 100}] (* T. D. Noe, Sep 25 2008 *)
Module[{nn=80, sps}, sps=Table[If[PrimeOmega[n]==2, 1, 0], {n, (nn+1)^2}]; Table[ Total[ Take[sps, {k^2+1, (k+1)^2-1}]], {k, 0, nn}]] (* Harvey P. Dale, Oct 03 2022 *)
PROG
(PARI) a(n)=sum(k=n^2+1, n^2+2*n, bigomega(k)==2) \\ Charles R Greathouse IV, Jan 31 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Philippe Lallouet (philip.lallouet(AT)orange.fr), May 08 2008
EXTENSIONS
Corrected, edited and extended by T. D. Noe, Sep 25 2008
STATUS
approved