cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A087054 Primes of the form pq + qr + rp where p, q and r are distinct primes.

This page as a plain text file.
%I A087054 #21 Sep 26 2015 17:42:36
%S A087054 31,41,59,61,71,101,103,113,131,151,167,191,199,211,227,239,241,251,
%T A087054 263,269,271,281,293,311,331,347,359,383,401,419,421,431,439,461,467,
%U A087054 479,487,491,503,521,541,563,571,587,599,607,617,631,641,647,653,661,691
%N A087054 Primes of the form pq + qr + rp where p, q and r are distinct primes.
%H A087054 T. D. Noe, <a href="/A087054/b087054.txt">Table of n, a(n) for n = 1..10000</a>
%e A087054 A003415(2*3*19)=2*3+3*19+19*2=101=A000040(26), therefore 101 is a term (but also A003415(2*5*13)=2*5+5*13+13*2=101).
%t A087054 sumProd[p_,q_,r_]:=p*q+p*r+q*r; pqrPrimes[nn_] := Module[{p=Prime[Range[PrimePi[(nn-6)/5]+1]],i,j,k,n}, Union[Reap[i=0; While[i++; sumProd[p[[i]],p[[i+1]],p[[i+2]]] <= nn, j=i; While[j++; sumProd[p[[i]],p[[j]],p[[j+1]]] <= nn, k=j; While[k++; n=sumProd[p[[i]],p[[j]],p[[k]]]; n <= nn, If[PrimeQ[n], Sow[n]]]]]][[2,1]]]]; pqrPrimes[1000] (* _T. D. Noe_, Apr 27 2011 *)
%t A087054 nn=100;Take[Select[Union[Total[Times@@@Subsets[#,{2}]]&/@Subsets[ Prime[ Range[ nn]],{3}]],PrimeQ],nn] (* _Harvey P. Dale_, Jan 08 2013 *)
%o A087054 (PARI) list(lim)=my(v=List()); forprime(r=5, (lim-6)\5, forprime(q=3, min((lim-2*r)\(r+2), r-2), my(S=q+r, P=q*r); forprime(p=2, min((lim-P)\S, q-1), isprime(p*S+P) && listput(v,p*S+P)))); Set(v) \\ _Charles R Greathouse IV_, Feb 26 2014
%o A087054 (PARI) is(n)=forprime(r=(sqrtint(3*n-3)+5)\3, (n-6)\5, forprime(q= sqrtint(r^2+n)-r+1, min((n-2*r)\(r+2), r-2), if((n-q*r)%(q+r)==0 && isprime((n-q*r)/(q+r)), return(isprime(n))))); 0 \\ _Charles R Greathouse IV_, Feb 26 2014
%Y A087054 Cf. A087053 (numbers of the form pq+qr+rp).
%Y A087054 Cf. A189759 (p*q*r for primes of this form).
%K A087054 nonn
%O A087054 1,1
%A A087054 _Reinhard Zumkeller_, Aug 07 2003
%E A087054 Corrected by _T. D. Noe_, Apr 27 2011