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.

Showing 1-5 of 5 results.

A024684 Number of ways prime(n) is a sum of three distinct primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 6, 9, 11, 13, 13, 15, 18, 17, 19, 25, 26, 28, 32, 31, 37, 32, 39, 44, 51, 54, 48, 60, 55, 62, 64, 73, 80, 79, 74, 89, 84, 92, 86, 92, 107, 119, 105, 118, 122, 117, 135, 143, 146, 147, 141, 149, 159, 157, 176, 175, 190, 180
Offset: 1

Views

Author

Keywords

Examples

			a(9) = 2 because prime(9) = 23 and 23 = 3 + 7 + 13 = 5 + 7 + 11.
		

Crossrefs

Programs

  • Mathematica
    last = 313; pp = PrimePi[last]; t = Select[Sort[Tally[Select[Total /@ Subsets[Prime[Range[2, pp]], {3}], PrimeQ]]], #[[1]] <= last &]; Join[{0, 0, 0, 0, 0, 0, 0}, Transpose[t][[2]]] (* T. D. Noe, Apr 15 2013 *)

Formula

a(n) = A125688(prime(n)). - R. J. Mathar, Jun 09 2014

A224535 Odd numbers that are the sum of three distinct prime numbers.

Original entry on oeis.org

15, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135
Offset: 1

Views

Author

T. D. Noe, Apr 15 2013

Keywords

Comments

Odd terms in A124867. - R. J. Mathar, Jun 09 2014

Examples

			15 = 3 + 5 + 7.
		

Crossrefs

Cf. A224534 (primes in this sequence).

Programs

  • Mathematica
    Union[Total /@ Subsets[Prime[Range[2, 30]], {3}]]

Extensions

"Odd" added by Irina Gerasimova, Apr 15 2013

A302607 a(n) is the greatest possible least prime in any partition of prime(n) into three primes; n >= 4.

Original entry on oeis.org

2, 3, 3, 5, 5, 5, 7, 7, 11, 11, 13, 13, 17, 17, 19, 19, 19, 19, 19, 23, 29, 29, 29, 31, 29, 31, 31, 41, 41, 43, 43, 43, 43, 43, 43, 53, 53, 59, 59, 59, 61, 59, 61, 67, 71, 71, 73, 71, 73, 79, 79, 79, 83, 83, 79, 83, 89, 89, 89, 101, 101, 103, 103, 109, 103, 107, 109
Offset: 4

Views

Author

David James Sycamore, Apr 10 2018

Keywords

Comments

Goldbach's weak (ternary) conjecture states that every odd number > 5 can be expressed as the sum of three primes (see link). This sequence applies the conjecture (now proved) to primes > 5. From all possible partitions of prime(n) = p+q+r for primes p,q,r (p <= q <= r), a(n) is chosen to be the maximum possible value of the least prime p. The sequence is not strictly increasing, and although many primes are repeated, some do not appear at all (e.g., 37 and 47 are not included).

Examples

			a(4) refers to prime(4) = 7 = 2+2+3 and since there is no (ordered) partition of 7 starting with a greater prime than 2, a(1)=2.
a(18) refers to prime(18) = 61 = 11+19+31 = 13+17+31 = 19+19+23, from which a(18)=19.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(pn = prime(n), res = 0); forprime(p=2, pn, forprime(q=p, pn, forprime(r=q, pn, if (p+q+r == pn, res = max(res, p));););); res;} \\ Michel Marcus, May 13 2018

Extensions

More terms from Michel Marcus, May 13 2018

A302756 a(n) is the least possible greatest prime in any partition of prime(n) into three primes; n >= 4.

Original entry on oeis.org

3, 5, 5, 7, 7, 11, 11, 13, 13, 17, 17, 17, 19, 23, 23, 29, 29, 31, 31, 31, 31, 37, 41, 37, 41, 41, 41, 43, 47, 47, 53, 53, 61, 61, 61, 61, 61, 61, 61, 71, 67, 71, 71, 73, 79, 83, 79, 83, 83, 83, 89, 89, 97, 97, 101, 97, 101, 97, 103, 103, 107, 107, 107, 113, 127, 127
Offset: 4

Views

Author

David James Sycamore, Apr 12 2018

Keywords

Comments

Goldbach's weak (ternary) conjecture states that every odd number > 5 can be expressed as the sum of three primes (see link). This sequence applies the conjecture (now proven) to primes > 5. From all possible partitions of prime(n) = p+q+r for primes p,q,r (p <= q <= r), a(n) is chosen as the least possible value of the greatest prime r (with lower prime p not constrained to be A302607(n)). The sequence is not strictly increasing, and although many primes appear repeatedly, some do not appear at all (e.g. 59 is not included).

Examples

			The partition of prime(5)=11 into 3 primes p <= q <= r is 11=3+3+5 and since no smaller value than 5 can be attributed to r, a(5)=5.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(pn = prime(n), res = oo); forprime(p=2, pn, forprime(q=p, pn, forprime(r=q, pn, if (p+q+r == pn, res = min(res, r));););); res;} \\ Michel Marcus, May 13 2018
    
  • PARI
    first(n) = {n = prime(n + 3); my(strt = vector(n, i, i), t = 0, res = vector(primepi(n) - 3)); forprime(p = 2, n, forprime(q = p, n - p, forprime(r = q, n - p - q, strt[p + q + r] = min(r, strt[p + q + r])))); forprime(p = 7, n, t++; res[t] = strt[p]); res} \\ David A. Corneth, May 14 2018

A340001 Number of ways prime(n) is a sum of five distinct primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 5, 6, 11, 14, 16, 25, 29, 39, 57, 68, 75, 88, 92, 109, 169, 198, 235, 240, 322, 331, 379, 437, 497, 565, 635, 634, 803, 798, 896, 888, 1091, 1328, 1477, 1444, 1616, 1753, 1730, 2080, 2262, 2452, 2627, 2588, 2790, 3043, 3004, 3535
Offset: 1

Views

Author

Michel Lagneau, Dec 26 2020

Keywords

Comments

Conjecture: all primes >= 43 are the sum of five distinct primes.
The sequence of the prime numbers that are the sum of five distinct prime numbers begins with 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, ...
The primes in the sequence are 2, 5, 11, 29, 109, 331, 379, 1091, 1753, ...
The squares in the sequence are 0, 1, 16, 25, 169, 1444, ...

Examples

			a(14) = 1 because prime(14) = 43 = 3 + 5 + 7 + 11 + 17.
a(17) = 5 because prime(17) = 59 = 3 + 5 + 7 + 13 + 31 = 3 + 5 + 11 + 17 + 23 = 3 + 7 + 13 + 17 + 19 = 5 + 7 + 11 + 13 + 23 = 5 + 7 + 11 + 17 + 19.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; series(`if`(n=0, 1,
          `if`(i<1, 0, b(n, i-1)+(p-> `if`(p>n, 0,
           x*b(n-p, i-1)))(ithprime(i)))), x, 6)
        end:
    a:= n-> coeff(b(ithprime(n), n), x, 5):
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 30 2020
  • Mathematica
    b[n_, i_] := b[n, i] = Series[If[n == 0, 1,
         If[i < 1, 0, b[n, i - 1] + Function[p, If[p > n, 0,
         x*b[n - p, i - 1]]][Prime[i]]]], {x, 0, 6}];
    a[n_] := SeriesCoefficient[b[Prime[n], n], {x, 0, 5}];
    Array[a, 100] (* Jean-François Alcover, Apr 26 2021, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[p,{5}],AllTrue[#,PrimeQ]&&Length[Union[#]]==5&]],{p,Prime[Range[70]]}] (* Harvey P. Dale, Jul 07 2024 *)

Formula

a(n) = A219199(A000040(n)).
a(n) = [x^prime(n)*y^5] Product_{i>=1} (1+x^prime(i)*y). - Alois P. Heinz, Dec 30 2020
Showing 1-5 of 5 results.