OFFSET
1,1
COMMENTS
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 2*A086870(n). - Ray Chandler, Apr 04 2016
EXAMPLE
a(1) = 14 = 2 * 7 that is semiprime. Also, 3 * 5 - 1 = 14 where {3,5} is a twin prime pair.
a(2) = 34 = 2 * 17 that is semiprime. Also, 5 * 7 - 1 = 34 where {5,7} is a twin prime pair.
MAPLE
MATHEMATICA
A269663= {}; Do[a = Prime[n]; b = a + 2; c = a*b - 1; If[PrimeQ[b] && PrimeOmega[c] == 2, AppendTo[A269663, c]], {n, 1000}]; A269663
Select[Times @@ # - 1 & /@ Transpose@{#, 2 + #} &@ Select[Prime@ Range@ 900, NextPrime@ # == # + 2 &], PrimeOmega@ # == 2 &] (* Michael De Vlieger, Apr 01 2016 *)
Select[Times@@@Select[Partition[Prime[Range[1000]], 2, 1], #[[2]]-#[[1]]==2&]-1, PrimeOmega[ #]==2&] (* Harvey P. Dale, Mar 14 2023 *)
PROG
(PARI) for(n = 1, 1000, p = prime(n); q = p + 2; c=(p*q) - 1; if(isprime(q) && bigomega(c)==2, print1(c, ", ")));
(Magma) IsP2:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ s: n in [1..1000] | IsPrime(n) and IsPrime(n+2) and IsP2(s) where s is (n * (n+2) - 1)];
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Mar 02 2016
STATUS
approved