A227019 Numbers k such that exactly one of {2^k-1, 2^k+1, 2^k+3} is semiprime.
3, 4, 6, 7, 8, 10, 12, 13, 14, 17, 19, 20, 24, 25, 26, 27, 28, 31, 35, 37, 39, 41, 42, 43, 45, 48, 49, 52, 54, 59, 62, 66, 67, 76, 79, 83, 87, 92, 97, 99, 100, 103, 104, 109, 114, 115, 127, 131, 132, 137, 139, 142, 148, 149, 151, 158, 162, 172, 189, 190, 191, 197, 207, 210, 220, 226, 227, 241, 255, 256, 269, 271, 281, 289, 291, 293, 294, 295
Offset: 1
Keywords
Examples
6 is in the sequence because 2^6 - 1 = 63 = 3^2 * 7 has three prime factors (with multiplicity), 2^6 + 1 = 65 = 5 * 13 is semiprime, and 2^6 + 3 = 67 is prime.
Programs
-
Mathematica
smQ[n_]:=Count[2^n+{1,3,-1},?(PrimeOmega[#]==2&)]==1; Select[Range[ 300], smQ] (* _Harvey P. Dale, Jan 30 2014 *)
-
PARI
issemi(n)=bigomega(n)==2 is(n)=my(N=2^n); if(issemi(N-1), !issemi(N+1)&&!issemi(N+3), issemi(N+1)+issemi(N+3)==1) \\ Charles R Greathouse IV, Jun 28 2013
Extensions
a(7)-a(61) from Charles R Greathouse IV, Jun 28 2013
a(62)-a(78) from Charles R Greathouse IV, Jul 03 2013
Comments