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!)
A330477 Semiprimes (A001358) p*q such that p*q+p+q is also a semiprime. 2
9, 22, 25, 39, 62, 69, 77, 87, 91, 94, 95, 106, 115, 119, 121, 122, 133, 134, 142, 146, 159, 183, 187, 202, 213, 214, 218, 219, 226, 235, 237, 249, 253, 259, 262, 265, 274, 287, 289, 291, 299, 303, 305, 309, 314, 335, 362, 381, 386, 393, 403, 411, 417, 422, 446, 458, 469, 473, 489, 501, 502, 505 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(3) = 25 is a member because 25 = 5*5 and 25+5+5 = 5*7 is also a semiprime.
MAPLE
N:= 1000:
Primes:= select(isprime, [2, seq(i, i=3..N)]):
SP:= sort([seq(seq([p, q], q=select(t -> t >= p and p*t<=N, Primes)), p=Primes)], (a, b) -> a[1]*a[2]<b[1]*b[2]):
map(t -> t[1]*t[2], select(t -> numtheory:-bigomega(t[1]*t[2]+t[1]+t[2])=2, SP));
MATHEMATICA
Select[Union@ Apply[Join, Table[Flatten@{p #, Sort[{p, #}]} & /@ Prime@ Range@ PrimePi@ Floor[Max[#]/p], {p, #}]] &@ Prime@ Range@ 97, PrimeOmega[Total@ #] == 2 &][[All, 1]] (* Michael De Vlieger, Dec 15 2019 *)
PROG
(PARI) issemi(n)=bigomega(n)==2
list(lim)=my(v=List()); forprime(p=2, sqrtint(lim\=1), forprime(q=p, lim\p, if(issemi(p*q+p+q), listput(v, p*q)))); Set(v) \\ Charles R Greathouse IV, Dec 16 2019
(Python)
from sympy import factorint
def is_semiprime(n): return sum(e for e in factorint(n).values()) == 2
def ok(n):
f = factorint(n, multiple=True)
if len(f) != 2: return False
p, q = f
return len(factorint(p*q + p + q, multiple=True)) == 2
print(list(filter(ok, range(506)))) # Michael S. Branicky, Sep 22 2021
CROSSREFS
Cf. A001358.
Contains A108570.
Sequence in context: A251292 A177458 A228009 * A295008 A154528 A130861
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 15 2019
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 23 13:38 EDT 2024. Contains 371914 sequences. (Running on oeis4.)