OFFSET
1,3
LINKS
Peter J. C. Moses, Table of n, a(n) for n = 1..1000
EXAMPLE
Let n=16, then 2*prime(16) = 2*53 = 106. We have 106-4=102, 106-9=97, 106-25=81, 106-49=57, and only the last number is semiprime. So a(16)=7.
PROG
(PARI) a(n) = {for (i=1, n, if ((v = 2*prime(n) - prime(i)^2) <= 0, break; ); if (bigomega(v) == 2, return (prime(i))); ); } \\ Michel Marcus, May 09 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Apr 25 2014
STATUS
approved