A198273 Primes not of the form p*q + p + q for any primes p and q.
2, 3, 5, 7, 13, 19, 29, 37, 43, 61, 67, 73, 97, 101, 103, 109, 137, 139, 149, 157, 163, 173, 181, 193, 197, 199, 211, 223, 229, 233, 241, 257, 277, 281, 283, 307, 313, 317, 331, 337, 347, 349, 353, 367, 373, 379, 389, 397, 401, 409, 421, 433, 457, 461, 463
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a198273 n = a198273_list !! (n-1) a198273_list = map a000040 $ filter ((== 0) . a067432) [1..]
-
Mathematica
nn = 500; n2 = PrimePi[nn/3]; Complement[Prime[Range[PrimePi[nn]]], Select[Union[Flatten[Table[(Prime[i] + 1) (Prime[j] + 1) - 1, {i, n2}, {j, n2}]]], # <= nn && PrimeQ[#] &]] (* T. D. Noe, Nov 22 2011 *) Reap[For[P=2, P<500, P = NextPrime[P], If[Reduce[P == p*q + p + q, {p, q}, Primes] === False, Print[P]; Sow[P]]]][[2, 1]] (* Jean-François Alcover, Dec 10 2015 *)
-
PARI
do(lim)=my(v=Set(),t);;forprime(p=3,lim,forprime(q=2,p-1,t=p*q+p+q;if(t>lim,break);v=setunion(v,[t])));setminus(primes(primepi(lim)),v) \\ Charles R Greathouse IV, Nov 22 2011
Comments