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!)
A238503 Numbers of the form pq + pr + ps + qr + qs + rs where p, q, r, and s are distinct primes. 1

%I #11 Jan 17 2021 19:19:55

%S 101,141,161,173,197,201,213,221,236,241,245,261,266,269,297,317,321,

%T 325,326,333,341,350,356,365,373,377,381,389,393,401,404,413,416,426,

%U 429,441,453,461,464,465,466,476,481,485,488,493,501,505,506

%N Numbers of the form pq + pr + ps + qr + qs + rs where p, q, r, and s are distinct primes.

%C Numbers of the form e2(p, q, r, s) for distinct primes p, q, r, s 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, A238397, and A007304 for 3 primes.

%C What is the density of this sequence, and is it less than 1? There are 701917 terms below a million and 7042080 below 10^7.

%C There are 70307093 terms below 10^8. - _Charles R Greathouse IV_, Jun 14 2017

%H Charles R Greathouse IV, <a href="/A238503/b238503.txt">Table of n, a(n) for n = 1..10000</a>

%e 101 = 2*3 + 2*5 + 2*7 + 3*5 + 3*7 + 5*7.

%t pqrs[{p_,q_,r_,s_}]:=Total[Times@@@Subsets[{p,q,r,s},{2}]]; Take[ Flatten[ pqrs/@Subsets[Prime[Range[20]],{4}]]//Union,50] (* _Harvey P. Dale_, Jan 17 2021 *)

%o (PARI) list(n)=my(v=List()); forprime(s=7,(n-31)\10,forprime(r=5, min((n-6-5*s)\(s+5),s-2), forprime(q=3, min((n-2*r-2*s-r*s)\(s+r+2), r-2), my(S=q+r+s, P=q*r+r*s+q*s); forprime(p=2, min((n-P)\S, q-1), listput(v, p*S+P))))); Set(v)

%o (PARI) list(n)=my(v=vectorsmall(n),u=List()); forprime(s=7,(n-31)\10,forprime(r=5, min((n-6-5*s)\(s+5),s-2), forprime(q=3, min((n-2*r-2*s-r*s)\(s+r+2), r-2), my(S=q+r+s, P=q*r+r*s+q*s); forprime(p=2, min((n-P)\S, q-1), v[p*S+P]=1)))); for(i=1,n,if(v[i],listput(u,i))); Vec(u)

%Y Cf. A238397.

%K nonn

%O 1,1

%A _Charles R Greathouse IV_, Feb 27 2014

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 July 29 16:25 EDT 2024. Contains 374734 sequences. (Running on oeis4.)