OFFSET
4,1
EXAMPLE
a(10) = 100 because the largest semiprime <= 10 is 10, the smallest semiprime >= 10 is 10 and 10*10=100.
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 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, May 09 2008
EXTENSIONS
More terms from R. J. Mathar, May 11 2008
STATUS
approved