cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A283268 Smallest b-a such that a < prime(n)^2 < b, where a,b are semiprimes.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Mar 04 2017

Keywords

Comments

This is the second sequence of the series of ones defined in A283267.

Examples

			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.
		

Crossrefs

Cf. A283267.

Programs

  • 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 *)
  • 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

Extensions

More terms from Peter J. C. Moses, Mar 04 2017