A283267 Smallest b-a such that a < prime(n) < b, where a,b are semiprimes.
2, 3, 4, 4, 6, 6, 3, 7, 7, 3, 7, 7, 3, 4, 4, 4, 4, 5, 5, 5, 3, 4, 11, 11, 11, 5, 5, 4, 6, 4, 7, 7, 9, 9, 3, 5, 3, 8, 5, 5, 7, 7, 7, 7, 4, 5, 9, 9, 9, 10, 10, 4, 5, 3, 7, 7, 4, 9, 9, 4, 4, 5, 5, 5, 5, 4, 9, 9, 9, 3, 6, 6, 4, 4, 5, 3, 5, 4, 5, 5, 10, 10, 8, 8, 4
Offset: 3
Keywords
Examples
For a(3), the largest semiprime below 5 is 4. The least semiprime above 5 is 6. Therefore, (a, b) = (4, 6) giving a(3) = 6 - 4 = 2. - _David A. Corneth_, Mar 04 2017
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 3..10000
Programs
-
Mathematica
Table[Module[{p = Prime@ n, a, b}, a = p - 1; b = p + 1; While[PrimeOmega@ a != 2, a--]; While[PrimeOmega@ b != 2, b++]; b - a], {n, 3, 120}] (* Michael De Vlieger, Mar 04 2017 *)
-
PARI
issemi(n)=bigomega(n)==2 a(n,p=prime(n))=my(a=p,b=p); while(!issemi(a--), ); while(!issemi(b++), ); b-a \\ Charles R Greathouse IV, Mar 04 2017
Formula
Extensions
More terms from Peter J. C. Moses, Mar 04 2017
Comments