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.

A140135 Product of largest semiprime <= n and smallest semiprime >= n.

Original entry on oeis.org

16, 24, 36, 54, 54, 81, 100, 140, 140, 140, 196, 225, 315, 315, 315, 315, 315, 441, 484, 550, 550, 625, 676, 858, 858, 858, 858, 858, 858, 1089, 1156, 1225, 1330, 1330, 1444, 1521, 1794, 1794, 1794, 1794, 1794, 1794, 2116, 2254, 2254, 2401, 2499, 2601, 2805
Offset: 4

Views

Author

Jonathan Vos Post, May 09 2008

Keywords

Comments

This is to A030664 as semiprimes A001358 are to primes A000040. Subset of A014613.

Examples

			a(10) = 100 because the largest semiprime <= 10 is 10, the smallest semiprime >= 10 is 10 and 10*10=100.
		

Crossrefs

Programs

  • Maple
    isA001358 := proc(n) RETURN( numtheory[bigomega](n) = 2) ; end: A001358 := proc(n) option remember ; local a; if n = 1 then 4; else for a from A001358(n-1)+1 do if isA001358(a) then RETURN(a) ; fi ; od: fi ; end: prevsemiprime := proc(n) local a; for a from n to 4 by -1 do if isA001358(a) then RETURN(a) ; fi ; od: RETURN(-1) ; end: nextsemiprime := proc(n) local a; for a from n do if isA001358(a) then RETURN(a) ; fi ; od: RETURN(-1) ; end: A140135 := proc(n) prevsemiprime(n)*nextsemiprime(n) ; end: seq(A140135(n),n=4..80) ; # R. J. Mathar, May 11 2008
  • Mathematica
    ls[n_]:=Module[{i=0},While[PrimeOmega[n+i]!=2,i++];n+i]; ss[n_]:=Module[ {i=0}, While[PrimeOmega[n-i]!=2,i++];n-i]; Table[ls[n]*ss[n],{n,4,60}] (* Harvey P. Dale, Oct 18 2013 *)

Formula

a(n) = MAX{j in A001358 and j <= n} * MIN{j in A001358 and j >= n}

Extensions

More terms from R. J. Mathar, May 11 2008