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

A045917 From Goldbach problem: number of decompositions of 2n into unordered sums of two primes.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 2, 4, 4, 2, 3, 4, 3, 4, 5, 4, 3, 5, 3, 4, 6, 3, 5, 6, 2, 5, 6, 5, 5, 7, 4, 5, 8, 5, 4, 9, 4, 5, 7, 3, 6, 8, 5, 6, 8, 6, 7, 10, 6, 6, 12, 4, 5, 10, 3, 7, 9, 6, 5, 8, 7, 8, 11, 6, 5, 12, 4, 8, 11, 5, 8, 10, 5, 6, 13, 9, 6, 11, 7, 7, 14, 6, 8, 13, 5, 8, 11, 7, 9
Offset: 1

Views

Author

Keywords

Comments

Note that A002375 (which differs only at the n = 2 term) is the main entry for this sequence.
The graph of this sequence is called Goldbach's comet. - David W. Wilson, Mar 19 2012
This is the row length sequence of A182138, A184995 and A198292. - Jason Kimberley, Oct 03 2012
The Goldbach conjecture states that a(n) > 0 for n >= 2. - Wolfdieter Lang, May 14 2016
With the second Maple program, the command G(2n) yields all the unordered pairs of prime numbers having sum 2n; caveat: a pair {a,a} is listed as {a}. Example: G(26) yields {{13}, {3,23}, {7,19}}. The command G(100000) yields 810 pairs very fast. - Emeric Deutsch, Jan 03 2017
Conjecture: Let p denote any prime in any decomposition of 2n. 4 and 6 are the only numbers n such that 2n + p is prime for every p. - Ivan N. Ianakiev, Apr 06 2017
Conjecture: For all m >= 0, there exists at least one possible value of n such that a(n) = m. - Ahmad J. Masad, Jan 06 2018
The previous conjecture is related to the sequence A053033. - Ahmad J. Masad, Dec 09 2019
Conjecture: For each k >= 0, there exists a minimum sufficiently large number r that depends on k such that for each n >= r, a(n) > k. - Ahmad J. Masad, Jan 08 2020
Conjecture: If the previous conjecture is true, then for each m >= 0, the number of terms that are equal to (m+1) is larger than the number of terms that are equal to m. - Ahmad J. Masad, Jan 08 2020
Also, the number of equidistant prime pairs in Goldbach's Prime Triangle for integers n > 2. An equidistant prime pair is a pair of not necessarily different prime numbers (p1, p2) that have the same distance d >= 0 from an integer n, i.e., so that p1 = n - d and p2 = n + d. - Jörg Winkelmann, Mar 05 2025

References

  • Calvin C. Clawson, "Mathematical Mysteries, the beauty and magic of numbers," Perseus Books, Cambridge, MA, 1996, Chapter 12, pages 236-257.
  • H. Halberstam and H. E. Richert, 1974, "Sieve methods", Academic press, London, New York, San Francisco.

Crossrefs

Cf. A002375 (the main entry for this sequence (which differs only at the n=2 term)).
Cf. A023036 (first appearance of n), A000954 (last (assumed) appearance of n).

Programs

  • Haskell
    a045917 n = sum $ map (a010051 . (2 * n -)) $ takeWhile (<= n) a000040_list
    -- Reinhard Zumkeller, Sep 02 2013
    
  • Magma
    [#RestrictedPartitions(2*n,2,Set(PrimesInInterval(1,2*n))):n in [1..100]]; // Marius A. Burtea, Jan 23 2020
  • Maple
    A045917 := proc(n)
        local a,i ;
        a := 0 ;
        for i from 1 to n do
            if isprime(i) and isprime(2*n-i) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Jul 01 2013
    # second Maple program:
    G := proc (n) local g, j: g := {}: for j from 2 to (1/2)*n do if isprime(j) and isprime(n-j) then g := `union`(g, {{n-j, j}}) end if end do: g end proc: seq(nops(G(2*n)), n = 1 .. 98); # Emeric Deutsch, Jan 03 2017
  • Mathematica
    f[n_] := Length[Select[2n - Prime[Range[PrimePi[n]]], PrimeQ]]; Table[ f[n], {n, 100}] (* Paul Abbott, Jan 11 2005 *)
    nn = 10^2; ps = Boole[PrimeQ[Range[1,2*nn,2]]]; Join[{0,1}, Table[Sum[ps[[i]] ps[[n-i+1]], {i, Ceiling[n/2]}], {n, 3, nn}]] (* T. D. Noe, Apr 13 2011 *)
  • PARI
    a(n)=my(s);forprime(p=2,n,s+=isprime(2*n-p));s \\ Charles R Greathouse IV, Mar 27 2012
    
  • Python
    from sympy import isprime
    def A045917(n):
        x = 0
        for i in range(2,n+1):
            if isprime(i) and isprime(2*n-i):
                x += 1
        return x # Chai Wah Wu, Feb 24 2015
    

Formula

From Halberstam and Richert: a(n) < (8+0(1))*c(n)*n/log(n)^2 where c(n) = Product_{p>2} (1 - 1/(p-1)^2)*Product_{p|n, p>2} (p-1)/(p-2). It is conjectured that the factor 8 can be replaced by 2. - Benoit Cloitre, May 16 2002
a(n) = ceiling(A035026(n) / 2) = (A035026(n) + A010051(n)) / 2.
a(n) = Sum_{i=2..n} floor(2/Omega(i*(2*n-i))). - Wesley Ivan Hurt, Jan 24 2013
a(n) = A224709(n) + (primepi(2n-2) - primepi(n-1)) + primepi(n) + 1 - n. - Anthony Browne, May 03 2016
a(n) = A224708(2n) - A224708(2n+1) + A010051(n). - Anthony Browne, Jun 26 2016
a(n) = Sum_{k=n*(n-1)/2+2..n*(n+1)/2} A064911(A105020(k-1)). - Wesley Ivan Hurt, Sep 11 2021
a(n) = omega(A362641(n)) = omega(A362640(n)). - Wesley Ivan Hurt, Apr 28 2023

A187129 Consider all pairs of primes (p,q) with p+q = 2n, p <= q; a(n) is the sum of all the q's.

Original entry on oeis.org

2, 3, 5, 12, 7, 18, 24, 24, 30, 47, 49, 55, 40, 59, 48, 100, 102, 50, 89, 120, 109, 136, 181, 158, 117, 199, 133, 170, 252, 133, 261, 300, 98, 267, 324, 279, 303, 419, 244, 303, 494, 345, 260, 593, 302, 343, 503, 207, 452, 612, 399, 488, 668, 526, 619, 872, 574, 540, 1082, 352, 475, 920, 273, 691, 865, 598, 523, 822, 725, 864, 1211
Offset: 2

Views

Author

N. J. A. Sloane, Mar 11 2011

Keywords

Examples

			2*5 = 10 can be expressed as the sum of two primes in two ways: 3+7 and 5+5, so a(5) = 7+5 = 12.
		

Crossrefs

Programs

  • Maple
    with(numtheory); a:=n-> sum( (2*n-i)*( ((pi(i) - pi(i-1)) * (pi(2*n-i) - pi(2*n-i-1))) ), i = 1..n ); seq(a(k),k=1..100); # Wesley Ivan Hurt, Jan 20 2013
  • Mathematica
    Table[Total[Select[IntegerPartitions[2*n,{2}],AllTrue[#,PrimeQ]&][[All,1]]],{n,2,100}] (* Harvey P. Dale, Aug 09 2020 *)
  • PARI
    a(n) = my(s=0); forprime(p=1, n, if (isprime(2*n-p), s += 2*n-p)); s; \\ Michel Marcus, Apr 29 2021

Formula

a(n) = Sum_{i=1..n} (2*n-i) * c(i) * c(2*n-i), where c = A010051. - Wesley Ivan Hurt, Apr 29 2021
a(n) = sopf(A362640(n)), n>=2. - Wesley Ivan Hurt, Apr 28 2023

A362641 Product of the smaller primes, p, in the Goldbach partitions of 2n such that p + q = 2n, p <= q, and p,q prime (or 1 if no Goldbach partition of 2n exists).

Original entry on oeis.org

1, 2, 3, 3, 15, 5, 21, 15, 35, 21, 165, 385, 273, 55, 1001, 39, 2805, 7735, 133, 561, 13585, 273, 5865, 124355, 5187, 1265, 391391, 741, 27115, 19605131, 1767, 64515, 5766215, 217, 374187, 12212915, 313131, 170085, 142635185, 63973, 902451, 13147103255, 223041, 101065, 818183948197
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 28 2023

Keywords

Examples

			a(10) = 21; 2*10 = 20 has two Goldbach partitions, namely 17+3 and 13+7. The product of the smaller parts of these partitions, is 3*7 = 21.
		

Crossrefs

Cf. A010051, A045917, A337568 (product of all prime parts), A362640 (product of the larger primes q).

Programs

  • Mathematica
    Table[Product[k^((PrimePi[k] - PrimePi[k - 1]) (PrimePi[2 n - k] - PrimePi[2 n - k - 1])), {k, n}], {n, 40}]

Formula

a(n) = Product_{k=1..n} k^(c(k)*c(2n - k)), where c is the prime characteristic (A010051).
a(n) = Product_{p+q = 2n, p<=q, and p,q prime} p.
a(n) = A337568(n) / A362640(n).

A337568 Product of all the parts in the Goldbach partitions (p,q) of 2n such that p + q = 2n, p <= q, and p,q prime (or 1 if no Goldbach partition of 2n exists).

Original entry on oeis.org

1, 4, 9, 15, 525, 35, 1617, 2145, 5005, 4641, 586245, 1616615, 1550913, 21505, 7436429, 21489, 985982745, 3038795305, 78337, 13844919, 10393190665, 12838371, 6896776665, 7292509103495, 12023917269, 70691995, 37198413949697, 62483343, 80309179885, 98755025688454681, 138969249
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 29 2020

Keywords

Examples

			a(9) = 5005; 2*9 = 18 has Goldbach partitions (13,5) and (11,7). The product of all the parts is 13 * 5 * 11 * 7 = 5005.
		

Crossrefs

Cf. A010051, A045917, A238711, A362640 (product of the larger primes q), A362641 (product of the smaller primes p).

Programs

  • Mathematica
    Table[Product[(i*(2 n - i))^((PrimePi[i] - PrimePi[i - 1]) (PrimePi[2 n - i] - PrimePi[2 n - i - 1])), {i, n}], {n, 40}]

Formula

a(n) = Product_{i=1..n} (i*(2*n-i))^(c(i)*c(2*n-i)), where c is the prime characteristic (A010051).
a(n) = A362640(n) * A362641(n).
Showing 1-4 of 4 results.