A192394 Number of semiprimes in the range (prime(n), prime(n)+sqrt(prime(n))).
0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 3, 2, 1, 2, 2, 3, 2, 2, 2, 2, 2, 4, 4, 4, 1, 2, 2, 2, 4, 6, 3, 4, 5, 5, 4, 4, 5, 2, 3, 4, 3, 4, 4, 6, 6, 7, 7, 3, 2, 2, 3, 4, 4, 5, 4, 4, 2, 3, 4, 4, 6, 8, 5, 6, 7, 7, 5, 4, 5, 5, 6, 5, 5, 5, 8
Offset: 1
Keywords
Examples
a(1)=0 because there are no semiprimes in the range (2, 2+sqrt(2)); a(2)=1 because there is one semiprime (4) in the range (3, 3+sqrt(3)).
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A001358.
Programs
-
Maple
A192394 := proc(n) local a,p,s; a := 0 ; p := ithprime(n) ; for s from p to floor( p+sqrt(p)) do if isA001358(s) then a := a+1 ; end if; end do: a; end proc: # R. J. Mathar, Jul 01 2011
-
Mathematica
(* First run A072000 to define semiPrimePi *) Table[semiPrimePi[Prime[n] + Sqrt[Prime[n]]] - semiPrimePi[Prime[n]], {n, 75}] (* Alonso del Arte, Jul 01 2011 *) Table[Count[Range[p,p+Sqrt[p]],?(PrimeOmega[#]==2&)],{p,Prime[Range[80]]}] (* _Harvey P. Dale, Feb 10 2025 *)
Extensions
Corrected by R. J. Mathar, Jul 01 2011