OFFSET
3,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 3..10000
Eric Weisstein's World of Mathematics, Semiprime
EXAMPLE
a(3) = 4 since 4 is the greatest semiprime less than prime(3) = 5.
MATHEMATICA
a[n_] := Module[{m = Prime[n] - 1}, While[PrimeOmega[m] != 2, m--]; m]; Array[a, 60, 3] (* Amiram Eldar, Feb 06 2020 *)
PROG
(PARI) a(n) = {sp = prime(n)-1; while(bigomega(sp) != 2, sp--); sp; } \\ Michel Marcus, Mar 04 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 08 2005
STATUS
approved