A243544 Primes p such that p^2 - p + 1 is semiprime.
5, 11, 29, 37, 41, 43, 53, 61, 71, 73, 83, 97, 109, 113, 127, 137, 149, 157, 167, 181, 191, 211, 223, 229, 241, 271, 277, 281, 307, 317, 331, 359, 389, 421, 433, 443, 461, 463, 487, 499, 547, 557, 571, 587, 601, 617, 631, 659, 661, 683, 691, 701, 709, 733, 757
Offset: 1
Keywords
Examples
11 is in the sequence because 11 is prime and 11^2 - 11 + 1 = 111 = 3 * 37 is semiprime. 29 is in the sequence because 29 is prime and 29^2 - 29 + 1 = 813 = 3 * 271 is semiprime. 17 is not in the sequence though 17 is prime, because 17^2 - 17 + 1 = 273 = 3 * 7 * 13, has more than two prime factors.
Links
- K. D. Bajpai, Table of n, a(n) for n = 1..7090
Programs
-
Maple
with(numtheory): A243544 := proc() local a; a:=ithprime(n); if bigomega(a^2-a+1)=2 then RETURN (a); fi; end: seq(A243544 (), n=1..200);
-
Mathematica
c = 0; Do[k = Prime[n]; If[PrimeOmega[k^2 - k + 1] == 2, c++; Print[c, " ", k]], {n, 1, 30000}]; Select[Prime[Range[150]],PrimeOmega[#^2-#+1]==2&] (* Harvey P. Dale, Oct 22 2024 *)
-
PARI
s=[]; forprime(p=2, 800, if(bigomega(p^2-p+1)==2, s=concat(s, p))); s \\ Colin Barker, Jun 06 2014
Comments