login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A174649 Numbers k such that semiprime(k)+/-1 are both semiprime. 1
12, 29, 33, 41, 47, 64, 70, 73, 96, 124, 137, 194, 211, 254, 277, 308, 333, 372, 395, 416, 471, 507, 529, 544, 560, 573, 602, 624, 637, 657, 672, 687, 696, 716, 752, 764, 767, 869, 949, 1003, 1025, 1069, 1079, 1090, 1176, 1212, 1242, 1261, 1343, 1523, 1553 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(1) = 12 because 12th semiprime = 2*17, 2*17-1 = 3*11 and 2*17+1 = 5*7;
a(2) = 29 because 29th semiprime = 2*43, 2*43-1 = 5*17 and 2*43+1 = 3*29.
MATHEMATICA
Flatten[Position[Select[Range[7000], PrimeOmega[#]==2&], _?(PrimeOmega[#-1] == PrimeOmega[#+1]==2&)]] (* Harvey P. Dale, Dec 18 2012 *)
PROG
(Python)
from sympy import factorint
from itertools import count, islice
def semiprimes():
for i in count(1):
if sum(factorint(i).values()) == 2:
yield i
def agen():
g = semiprimes()
prevsp, sp, nextsp = next(g), next(g), next(g)
for k in count(2):
if nextsp - prevsp == 2:
yield k
prevsp, sp, nextsp = sp, nextsp, next(g)
print(list(islice(agen(), 51))) # Michael S. Branicky, Dec 29 2021
CROSSREFS
Cf. A001358.
Sequence in context: A000546 A130516 A045554 * A161452 A353872 A212867
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected by Ray Chandler, Apr 06 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:43 EDT 2024. Contains 371967 sequences. (Running on oeis4.)