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.

Previous Showing 11-15 of 15 results.

A178041 Number of ways to represent the n-th prime (which has a nonzero number of such representations) as the sum of 4 distinct primes.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 6, 6, 8, 10, 13, 14, 13, 18, 21, 17, 21, 30, 21, 32, 23, 37, 27, 45, 35, 34, 54, 43, 60, 61, 67, 44, 52, 55, 79, 58, 89, 57, 92, 100, 111, 69, 119, 76, 83, 122, 91, 89, 94, 102, 147, 146, 106, 159, 116, 176, 125, 190, 119, 195, 202, 136, 230, 148, 154, 222
Offset: 1

Views

Author

Jonathan Vos Post, May 17 2010

Keywords

Examples

			a(1) = 1 because 17 = 2+3+5+7 is the unique solution for the smallest such prime.
a(2) = 2 because 23 = 2+3+5+13 = 2+3+7+11 are the only two solutions for the 2nd smallest such prime.
a(3) = 3 because 29 = 2+3+5+19 = 2+3+7+17 = 2+3+11+13 are the only 3 solutions for the 3rd smallest such prime.
a(4) = 3 because 31 = 2+3+7+19 = 2+5+7+17 = 2+5+11+13 are the only 3 solutions for the 4th smallest such prime.
a(5) = 5 because 37 = 2+3+13+19 = 2+5+7+23 = 2+5+11+19 = 2+5+13+17 = 2+7+11+17 are the only 5 solutions for the 5th smallest such prime.
		

Crossrefs

Cf. A000040, A038609 (sum of 2 distinct primes), A124867 (sum of 3 distinct primes), A124868 (not the sum of 3 distinct primes), A124884 (not the sum of n distinct primes).

Programs

  • Mathematica
    max=367;lim=PrimePi[max];p4=Sort[Total/@Subsets[Prime[Range[lim]],{4}]];p4p=Select[p4,PrimeQ[#]&&#<=max&]; s={};Do[c=Count[p4p,Prime[p]];If[c>0,AppendTo[s,c]],{p,lim}];s (* James C. McMahon, Jan 11 2025 *)

Extensions

Extended by Zak Seidov

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

Original entry on oeis.org

101, 141, 161, 173, 197, 201, 213, 221, 236, 241, 245, 261, 266, 269, 297, 317, 321, 325, 326, 333, 341, 350, 356, 365, 373, 377, 381, 389, 393, 401, 404, 413, 416, 426, 429, 441, 453, 461, 464, 465, 466, 476, 481, 485, 488, 493, 501, 505, 506
Offset: 1

Views

Author

Keywords

Comments

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.
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.
There are 70307093 terms below 10^8. - Charles R Greathouse IV, Jun 14 2017

Examples

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

Crossrefs

Cf. A238397.

Programs

  • Mathematica
    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 *)
  • 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)
    
  • 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)

A243624 Numbers that are the sum of 2 different primes, with repetitions.

Original entry on oeis.org

5, 7, 8, 9, 10, 12, 13, 14, 15, 16, 16, 18, 18, 19, 20, 20, 21, 22, 22, 24, 24, 24, 25, 26, 26, 28, 28, 30, 30, 30, 31, 32, 32, 33, 34, 34, 34, 36, 36, 36, 36, 38, 39, 40, 40, 40, 42, 42, 42, 42, 43, 44, 44, 44, 45, 46, 46, 46, 48, 48, 48, 48, 48, 49, 50, 50, 50, 50, 52, 52, 52, 54, 54, 54, 54, 54, 55, 56, 56, 56, 58, 58, 58
Offset: 1

Views

Author

Zak Seidov, Mar 07 2015

Keywords

Examples

			16=3+13=5+11 hence 16 occurs twice.
24=5+19=7+13=11+13 hence 24 occurs 3 times.
50=p+q with {p,q}={{3,47},{7,43},{13,37},{19,31}}, 4 representations.
48=p+q with {p,q}={{5,43},{7,41},{11,37},{17,31},{19,29}}, 5 representations.
		

Crossrefs

Programs

A352305 a(n) is the (conjectured) largest even number that can be expressed as the sum of two distinct primes in exactly n ways.

Original entry on oeis.org

6, 38, 68, 128, 158, 188, 398, 362, 458, 542, 632, 692, 602, 992, 808, 908, 1112, 1238, 1412, 1418, 1718, 1544, 1574, 1622, 1682, 2048, 2252, 2018, 2672, 2042, 2558, 2936, 2504, 2978, 2966, 3092, 3218, 3242, 3272, 3506, 3632, 3754, 4022, 4058, 4052, 4412, 4448, 4478
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 11 2022

Keywords

Examples

			a(5) = 188 because 188 = 7 + 181 = 31 + 157 = 37 + 151 = 61 + 127 = 79 + 109 and it is conjectured that 188 is the last term of A080854.
		

Crossrefs

Extensions

More terms from Hugo Pfoertner, Dec 18 2024

A352596 Conjecturally the number of positive even integers that can be expressed as the sum of two distinct primes in exactly n ways.

Original entry on oeis.org

3, 5, 9, 12, 12, 16, 19, 13, 24, 19, 21, 25, 15, 29, 28, 16, 31, 22, 34, 32, 20, 29, 26, 24, 28, 36, 34, 35, 37, 22, 29, 37, 36, 34, 39, 32, 39, 35, 28, 31, 28
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 22 2022

Keywords

Crossrefs

Previous Showing 11-15 of 15 results.