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
KEYWORD
nonn
AUTHOR
Jean-François Alcover, Feb 26 2014
STATUS
approved