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-3 of 3 results.

A023036 Smallest positive even integer that is an unordered sum of two primes in exactly n ways.

Original entry on oeis.org

2, 4, 10, 22, 34, 48, 60, 78, 84, 90, 114, 144, 120, 168, 180, 234, 246, 288, 240, 210, 324, 300, 360, 474, 330, 528, 576, 390, 462, 480, 420, 570, 510, 672, 792, 756, 876, 714, 798, 690, 1038, 630, 1008, 930, 780, 960, 870, 924, 900, 1134, 1434, 840, 990, 1302, 1080
Offset: 0

Views

Author

David W. Wilson, Jun 14 1998

Keywords

Comments

Except for first two terms, same as A001172.
The first occurrence of k in A045917.
The graph looks like a comet. - Daniel Forgues, Jun 12 2014

Examples

			a(3) = 22 as 22 = (19+3) = (17+5) = (11+11). There are exactly 3 ways 22 can be expressed as the sum of two primes and no even number less than 22 can be so expressed.
From _Daniel Forgues_, Jun 13 2014: (Start)
Terms for n = 1..6 and corresponding sums:
  a(1) =  4 =  2 + 2;
  a(2) = 10 =  7 + 3 =  5 +  5;
  a(3) = 22 = 19 + 3 = 17 +  5 = 11 + 11;
  a(4) = 34 = 31 + 3 = 29 +  5 = 23 + 11 = 17 + 17;
  a(5) = 48 = 43 + 5 = 41 +  7 = 37 + 11 = 31 + 17 = 29 + 19;
  a(6) = 60 = 53 + 7 = 47 + 13 = 43 + 17 = 41 + 19 = 37 + 23 = 31 + 29.
(End)
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ Select[2n - Prime@ Range@ PrimePi@ n, PrimeQ]; nn = 100; t = Table[0, {nn}]; k = 1; cnt = 0; While[cnt < nn, a = f@k; If[a <= nn && t[[a]] == 0, t[[a]] = 2 k; cnt++]; k++]; t (* Robert G. Wilson v, Mar 15 2011 *)

A001172 Smallest even number that is an unordered sum of two odd primes in exactly n ways.

Original entry on oeis.org

0, 6, 10, 22, 34, 48, 60, 78, 84, 90, 114, 144, 120, 168, 180, 234, 246, 288, 240, 210, 324, 300, 360, 474, 330, 528, 576, 390, 462, 480, 420, 570, 510, 672, 792, 756, 876, 714, 798, 690, 1038, 630, 1008, 930, 780, 960, 870, 924, 900, 1134, 1434, 840, 990, 1302
Offset: 0

Views

Author

N. J. A. Sloane, Eric Wolman, Dec 17 1969

Keywords

Comments

a(n) = A023036(n) for all n > 1.

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Divided by 2: A258713.

Programs

  • Mathematica
    nn = 55; a = Table[0, {nn}]; n = 6; While[Times @@ a == 0, c = 0; k = 3; While[k <= n/2, If[PrimeQ[k] && PrimeQ[n - k], c++]; k++]; If[c <= nn && a[[c]] == 0, a[[c]] = n]; n = n + 2]; Prepend[a, 0]

Extensions

a(0) corrected by Zak Seidov, Sep 30 2011

A136244 Least positive integer k such that 2k can be expressed as the sum of two primes in exactly n ways.

Original entry on oeis.org

1, 2, 5, 11, 17, 24, 30, 39, 42, 45, 57, 72, 60, 84, 90, 117, 123, 144, 120, 105, 162, 150, 180, 237, 165, 264, 288, 195, 231, 240, 210, 285, 255, 336, 396, 378, 438, 357, 399, 345, 519, 315, 504, 465, 390, 480, 435, 462, 450, 567, 717, 420, 495, 651, 540, 615, 759, 525, 570, 693, 645
Offset: 0

Views

Author

K. B. Subramaniam (shunya_1950(AT)yahoo.co.in), Dec 24 2007

Keywords

Comments

It appears that 2, 3, 4, 6 are the only numbers k such that 2k can be expressed as the sum of two primes in only one way.
Except when n = 1, a(n) = A258713(n). The first 11 terms of this sequence are the same as the initial terms of A053033. If a(n) exists for all n then A053033 is a subsequence. - Andrew Howroyd, Jan 28 2020

Examples

			a(3) = 11: 22 = 3 + 19 = 5 + 17 = 11 + 11. Also 22 is the least number which could be expressed as the sum of two prime numbers in exactly three ways.
		

Crossrefs

Programs

  • PARI
    a(n, lim=oo)={for(i=1, lim, my(s=0); forprime(p=2, i, s+=isprime(2*i-p)); if(s==n, return(i))); -1} \\ Andrew Howroyd, Jan 28 2020

Formula

From Andrew Howroyd, Jan 28 2020: (Start)
a(n) = A023036(n) / 2.
A045917(a(n)) = n. (End)

Extensions

a(0)=1 prepended, a(5) corrected and a(7) and beyond from Andrew Howroyd, Jan 28 2020
Showing 1-3 of 3 results.