|
|
A086005
|
|
Semiprimes sandwiched between semiprimes.
|
|
14
|
|
|
34, 86, 94, 122, 142, 202, 214, 218, 302, 394, 446, 634, 698, 842, 922, 1042, 1138, 1262, 1346, 1402, 1642, 1762, 1838, 1894, 1942, 1982, 2102, 2182, 2218, 2306, 2362, 2434, 2462, 2518, 2642, 2722, 2734, 3098, 3386, 3602, 3694, 3866, 3902, 3958, 4286, 4414
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
Eric Weisstein's World of Mathematics, Semiprime
|
|
FORMULA
|
|
|
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
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|