OFFSET
1,1
COMMENTS
These are some of the balanced semiprimes (see A213025). - Alonso del Arte, Jun 04 2012
LINKS
T. D. Noe, Table of n, a(n) for n=1..10000
Eric Weisstein's World of Mathematics, Semiprime
FORMULA
a(n) = 2*A086006(n).
a(n) = A056809(n)+1. - Zak Seidov, Sep 30 2012
EXAMPLE
94 = 47*2: 94 - 1 = 3*31 and 94 + 1 = 5*19, therefore 94 is in the sequence.
MATHEMATICA
u[n_]:=Plus@@Last/@FactorInteger[n]==2; lst={}; Do[If[u[n], sp=n; If[u[sp-1]&&u[sp+1], AppendTo[lst, sp]]], {n, 8!}]; lst (* Vladimir Joseph Stephan Orlovsky, Nov 16 2009 *)
(* First run program for A109611 to define semiPrimeQ *) Select[Range[4000], Union[{semiPrimeQ[# - 1], semiPrimeQ[#], semiPrimeQ[# + 1]}] == {True} &] (* Alonso del Arte, Jun 03 2012 *)
Select[Partition[Range@ 4000, 3, 1], Union@ PrimeOmega@ # == {2} &][[All, 2]] (* Michael De Vlieger, Jun 14 2017 *)
PROG
(Haskell)
a086005 n = a086005_list !! (n-1)
a086005_list = filter
(\x -> a064911 (x - 1) == 1 && a064911 (x + 1) == 1) a100484_list
-- Reinhard Zumkeller, Aug 08 2013, Jun 10 2012
(Python)
from itertools import count, islice
from sympy import factorint, isprime
def agen(): # generator of terms
nxt = 0
for k in count(2, 2):
prv, nxt = nxt, sum(factorint(k+1).values())
if prv == nxt == 2 and isprime(k//2): yield k
print(list(islice(agen(), 46))) # Michael S. Branicky, Nov 26 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 07 2003
STATUS
approved