A269662 Semiprimes which are the sum of a twin prime pair plus one.
9, 25, 85, 121, 145, 205, 217, 301, 361, 481, 565, 697, 841, 865, 1141, 1285, 1717, 1765, 2041, 2101, 2305, 2461, 2581, 2605, 2641, 2965, 2977, 3241, 3337, 3397, 3865, 3901, 3997, 4285, 4537, 4681, 4765, 5317, 5377, 5461, 5941, 6001, 6241, 6505, 6937, 7081, 7117
Offset: 1
Keywords
Examples
a(2) = 25 = 5 * 5 that is semiprime. Also, 25 = 11 + 13 + 1 where {11, 13} is a twin prime pair. a(3) = 85 = 5 * 17 that is semiprime. Also, 55 = 41 + 43 + 1 where {41, 43} is a twin prime pair.
Links
- K. D. Bajpai, Table of n, a(n) for n = 1..10000
Programs
-
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)];
-
Mathematica
A269662 = {}; Do[a = Prime[n]; b = a + 2; c = a + b + 1; If[PrimeQ[b] && PrimeOmega[c] == 2, AppendTo[A269662, c]], {n, 1000}]; A269662 Select[Range[1, 7200, 2], And[PrimeOmega@ # == 2, And[PrimeQ@ #, NextPrime[#] - 2] == # &[(# - 1)/2 - 1]] &] (* Michael De Vlieger, Apr 01 2016 *) Select[1+Total[#]&/@Select[Partition[Prime[Range[500]],2,1],#[[2]]-#[[1]] == 2&],PrimeOmega[#]==2&] (* Harvey P. Dale, Apr 10 2016 *)
-
PARI
for(n = 1, 1000, p=prime(n); q=p+2; s=p+q+1; if(isprime(q) && bigomega(s)==2, print1(s,", ")));
Comments