A290434 Semiprimes of the form pq such that p+q+1 is prime.
4, 9, 21, 25, 35, 39, 55, 57, 65, 77, 85, 111, 115, 121, 129, 155, 161, 185, 187, 201, 203, 205, 209, 221, 235, 237, 265, 291, 299, 305, 309, 319, 323, 327, 335, 341, 365, 371, 377, 381, 391, 413, 415, 437, 451, 485, 489, 493, 497, 505, 515, 517, 529, 535, 579
Offset: 1
Keywords
Examples
377 = 13*29 and 13+29+1 is prime, so 377 is a term.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A001358.
Programs
-
Mathematica
With[{nn = 55}, Take[#, nn] &@ Union@ Flatten@ Table[Function[p, Map[Times @@ # &@ # &, #] &@ Select[Map[{p, #} &, Prime@ Range[PrimePi@ p]], PrimeQ[Total@ # + 1] &]]@ Prime@ n, {n, nn + 4}]] (* Michael De Vlieger, Aug 01 2017 *) Select[Range[600],PrimeOmega[#]==2&&PrimeQ[Total[Times@@@ FactorInteger[ #]]+1]&] (* Harvey P. Dale, Sep 25 2019 *)
-
PARI
isok(n) = {if (bigomega(n) == 2, f = factor(n); if (#f~ == 1, isprime(2*f[1,1]+1), isprime(vecsum(f[,1]+1))););} \\ Michel Marcus, Aug 02 2017
-
Python
from sympy import factorint, isprime A290434_list = [n for n in range(2,10**5) if sum(factorint(n).values()) == 2 and isprime(1+sum(factorint(n).keys())*(3-len(factorint(n))))]
Comments