OFFSET
1,1
COMMENTS
The even members of the sequence are A054735. - Robert Israel, Jan 18 2015
The prime members of the sequence are A063643. - Michel Marcus, Mar 27 2015
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
From Jon E. Schoenfield, Jan 18 2015: (Start)
12 - 2 = 10 = 2*5 and 12 + 2 = 14 = 2*7 so 12 is in the sequence.
23 - 2 = 21 = 3*7 and 23 + 2 = 25 = 5*5 so 23 is in the sequence.
16 - 2 = 14 = 2*7 but 16 + 2 = 18 = 2*3*3 so 16 is not in the sequence.
(End)
MAPLE
select(n -> numtheory:-bigomega(n+2) = 2 and numtheory:-bigomega(n-2) = 2,
[$1..1000]); # Robert Israel, Jan 18 2015
MATHEMATICA
q=2; lst={}; Do[If[Plus@@Last/@FactorInteger[n-q]==q&&Plus@@Last/@FactorInteger[n+q]==q, AppendTo[lst, n]], {n, 7!}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 01 2009 *)
Select[Range[700], PrimeOmega[# + 2] == PrimeOmega[# - 2] == 2 &] (* Vincenzo Librandi, Mar 30 2015 *)
PROG
(Magma) IsSemiprime:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ n: n in [3..700] | IsSemiprime(n+2) and IsSemiprime(n-2) ]; // Vincenzo Librandi, Mar 30 2015
(Haskell)
a105571 n = a105571_list !! (n-1)
a105571_list = [x | x <- [3..], a064911 (x - 2) == 1, a064911 (x + 2) == 1]
-- Reinhard Zumkeller, Mar 31 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 14 2005
STATUS
approved