login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A198273 Primes not of the form p*q + p + q for any primes p and q. 3

%I #21 Dec 10 2015 13:20:06

%S 2,3,5,7,13,19,29,37,43,61,67,73,97,101,103,109,137,139,149,157,163,

%T 173,181,193,197,199,211,223,229,233,241,257,277,281,283,307,313,317,

%U 331,337,347,349,353,367,373,379,389,397,401,409,421,433,457,461,463

%N Primes not of the form p*q + p + q for any primes p and q.

%C A067432(A049084(a(n))) = 0; complement of A066938 with respect to A000040.

%H Reinhard Zumkeller, <a href="/A198273/b198273.txt">Table of n, a(n) for n = 1..10000</a>

%t 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 *)

%t 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 *)

%o (Haskell)

%o a198273 n = a198273_list !! (n-1)

%o a198273_list = map a000040 $ filter ((== 0) . a067432) [1..]

%o (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

%Y Cf. A000040, A049084, A066938, A067432.

%K nonn,nice

%O 1,1

%A _Reinhard Zumkeller_, Oct 23 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)