OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
27=3^3 and 45=3^2*9 are in the sequence because 27+2 = 29 and 45+2 = 47 are primes.
8=2^3, 12=2^2*3, and 20=2^2*5 are in the sequence because 8+2=10=2*5, 12+2=14=2*7, and 20+2=22=2*11 are semiprimes (A001358).
MAPLE
A211410 := proc(n)
option remember;
local a;
if n = 1 then
8;
else
for a from procname(n-1)+1 do
if numtheory[bigomega](a) = 3 then
if isprime(a+2) or numtheory[bigomega](a+2) = 2 then
return a;
end if;
end if;
end do:
end if;
end proc:
seq(A211410(n), n=1..80) ; # R. J. Mathar, Feb 10 2013
MATHEMATICA
Select[Range[600], PrimeOmega[#]==3&&PrimeOmega[#+2]<3&] (* Harvey P. Dale, Jul 15 2019 *)
PROG
(PARI) issemi(n)=bigomega(n)==2
list(lim)=my(v=List(), pq); forprime(p=2, lim\4, forprime(q=2, min(lim\2\p, p), pq=p*q; forprime(r=2, min(lim\pq, q), if(isprime(pq*r+2) || issemi(pq*r+2), listput(v, pq*r))))); Set(v) \\ Charles R Greathouse IV, Aug 23 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Feb 09 2013
STATUS
approved