login
A238397
Numbers of the form pq + qr + rp where p, q and r are distinct primes (sorted sequence without duplicates).
4
31, 41, 59, 61, 71, 87, 91, 101, 103, 113, 119, 121, 129, 131, 143, 151, 161, 167, 171, 185, 191, 199, 211, 213, 215, 221, 227, 239, 241, 243, 247, 251, 263, 269, 271, 275, 281, 293, 297, 299, 301, 311, 321, 327, 331, 339, 341, 343, 347, 355
OFFSET
1,1
COMMENTS
Numbers of the form e2(p, q, r) for distinct primes p, q, r, where e2 is the elementary symmetric polynomial of degree 2. Other sequences are obtained with different numbers of distinct primes and degrees: A000040 for 1 prime, A038609 and A006881 for 2 primes, A124867, this sequence, and A007304 for 3 primes. The 4-prime sequences are not presently in the OEIS with the exception of A046386. - Charles R Greathouse IV, Feb 26 2014
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..1000
EXAMPLE
71 = 3*5 + 5*7 + 7*3 = 2*3 + 3*13 + 13*2 is in the sequence (only once, though 2 solutions exist).
MATHEMATICA
terms = 50; dm (* initial number of primes *) = 10; f[p_, q_, r_] := p*q + q*r + r*p; Clear[A238397]; A238397[m_] := A238397[m] = Take[u = Union[f @@@ Subsets[Prime /@ Range[m], {3}]], Min[Length[u], terms]]; A238397[dm]; A238397[m = 2*dm]; While[Print["m = ", m]; A238397[m] != A238397[m - dm], m = m + dm]; A238397[m]
PROG
(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(1)))); 0 \\ Charles R Greathouse IV, Feb 26 2014
(PARI) list(n)=my(v=List()); forprime(r=5, (n-6)\5, forprime(q=3, min((n-2*r)\(r+2), r-2), my(S=q+r, P=q*r); forprime(p=2, min((n-P)\S, q-1), listput(v, p*S+P)))); Set(v) \\ Charles R Greathouse IV, Feb 26 2014
CROSSREFS
Sequence in context: A105320 A104822 A198175 * A087054 A245650 A363187
KEYWORD
nonn
AUTHOR
STATUS
approved