OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
1969 is in the sequence because 1969 = 11*179, and 11-1 = 2*5 and 179-1 = 2*89 are semiprimes.
MAPLE
with(numtheory):for n from 2 to 3000 do: x:=factorset(n):y:=bigomega(n):z:=x[1]:zz:=n/z:if y=2 and type(z, prime)=true and type(zz, prime) = true and bigomega(z-1)=2 and bigomega(zz-1)=2 then printf(`%d, `, n): else fi:od:
# Alternate:
N:= 10000: # to get all terms <= N
P:= select(p -> isprime(p) and numtheory:-bigomega(p-1)=2, [$1..N/5]):
nP:= nops(P):
sort(select(`<=`, [seq(seq(P[i]*P[j], i=1..j), j=1..nP)], N)); # Robert Israel, Mar 23 2018
MATHEMATICA
spsQ[n_]:=Module[{f=Transpose[FactorInteger[n]][[1]]}, PrimeOmega[n] == PrimeOmega[First[f]-1] == PrimeOmega[Last[f]-1]==2]; Select[Range[ 3000], spsQ] (* Harvey P. Dale, Jul 27 2011 *)
PROG
(PARI) upTo(lim)=my(u=List(), v=List(), t); forprime(p=2, lim\5, if(isprime(p\2), listput(u, p))); for(i=1, #u, for(j=1, i, t=u[i]*u[j]; if(t>lim, break, listput(v, t)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 30 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jul 17 2011
STATUS
approved