login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A283268
Smallest b-a such that a < prime(n)^2 < b, where a,b are semiprimes.
2
4, 4, 5, 3, 11, 4, 4, 6, 4, 6, 5, 6, 8, 9, 4, 9, 7, 10, 9, 4, 3, 4, 19, 4, 4, 11, 12, 6, 6, 15, 9, 8, 7, 6, 6, 7, 12, 12, 10, 14, 7, 12, 14, 6, 3, 9, 10, 7, 8, 5, 9, 6, 4, 7, 5, 4, 13, 8, 4, 14, 11, 11, 14, 15, 24, 10, 7, 12, 3, 7, 5, 12, 18, 3, 6, 4, 7, 12, 4
OFFSET
2,1
COMMENTS
This is the second sequence of the series of ones defined in A283267.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 2..10000
EXAMPLE
a(2) = 4 since prime(2)^2 = 3^2 = 9; 6 < 9 < 10, 6 = 2*3 and 10 = 2*5; 10 - 6 = 4. The number prime(1)^2 = 2^2 = 4 is the smallest semiprime, therefore the offset of the sequence is 2 since there are no positive semiprimes less than 4.
MATHEMATICA
Table[Module[{m = Prime[n]^2, a, b}, a = m - 1; b = m + 1; While[PrimeOmega@ a != 2, a--]; While[PrimeOmega@ b != 2, b++]; b - a], {n, 2, 120}] (* Michael De Vlieger, Mar 04 2017 *)
PROG
(PARI) issemi(n)=bigomega(n)==2
a(n, p=prime(n))=my(a=p^2, b=a); while(!issemi(a--), ); while(!issemi(b++), ); b-a \\ Charles R Greathouse IV, Mar 06 2017
CROSSREFS
Cf. A283267.
Sequence in context: A330305 A379134 A011333 * A016709 A023403 A091283
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Mar 04 2017
EXTENSIONS
More terms from Peter J. C. Moses, Mar 04 2017
STATUS
approved