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.

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

This page as a plain text file.
%I A238503 #11 Jan 17 2021 19:19:55
%S A238503 101,141,161,173,197,201,213,221,236,241,245,261,266,269,297,317,321,
%T A238503 325,326,333,341,350,356,365,373,377,381,389,393,401,404,413,416,426,
%U A238503 429,441,453,461,464,465,466,476,481,485,488,493,501,505,506
%N A238503 Numbers of the form pq + pr + ps + qr + qs + rs where p, q, r, and s are distinct primes.
%C A238503 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 A238503 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 A238503 There are 70307093 terms below 10^8. - _Charles R Greathouse IV_, Jun 14 2017
%H A238503 Charles R Greathouse IV, <a href="/A238503/b238503.txt">Table of n, a(n) for n = 1..10000</a>
%e A238503 101 = 2*3 + 2*5 + 2*7 + 3*5 + 3*7 + 5*7.
%t A238503 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 A238503 (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 A238503 (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 A238503 Cf. A238397.
%K A238503 nonn
%O A238503 1,1
%A A238503 _Charles R Greathouse IV_, Feb 27 2014