Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a functon that counts the number of ways in which an even number can be expressed as a sum of two primes?

share|cite|improve this question
there is one, you just defined it... – Xoff Aug 7 '12 at 12:55
up vote 6 down vote accepted

See Goldbach's comet at Wikipedia.

EDIT: To expand on this a little, let $g(n)$ be the number of ways of expressing the even number $n$ as a sum of two primes. Wikipedia gives a heuristic argument for $g(n)$ to be approximately $2n/(\log n)^2$ for large $n$. Then it points out a flaw with the heuristic, and explains how Hardy and Littlewood repaired the flaw to come up with a better conjecture. The better conjecture states that, for large $n$, $g(n)$ is approximately $cn/(\log n)^2$, where $c>0$ depends on the primes dividing $n$. In all cases, $c>1.32$.

I stress that this is all conjectural, as no one has been able to prove even that $g(n)>0$ for all even $n\ge4$.

share|cite|improve this answer

Yes, there is such a function and it has been studied for at least a century. See Sloane's A002375. But it doesn't have a set letter specified for it. Here I will use $g$. So, for example, $g(36) = 4$, $g(38) = 2$. (If you're looking in Sloane's, be sure to divide by 2 before looking up). There is also a function which requires the primes to be distinct, so $31 + 7 = 38$ counts but $19 + 19$ does not; that has also been studied for at least a century.

Now, is there a formula that you can plug in an even number $2n$ and have it give you an answer without knowing the primes up to $n$? I think that if the Riemann hypothesis is proven, it could lead to such a formula. As a quick and dirty estimate, I suggest $g(2n) \approx \frac{n}{8}$; your mileage may vary.

EDIT: Gerry Myerson rightly pointed out that $g(2n) < \pi(n)$, and that my quick and dirty estimate is quite inadequate for large numbers. From his comment, I revise my quick and dirty estimate to $g(2n) \approx \frac{n}{4 \log n}$. The point that I was getting at is that Bertrand's postulate tells us there is always at least one prime between $n$ and $2n$, and it seems unlikely to me that each and every prime in that interval would fail to "match" to a prime between 1 and $n$.

share|cite|improve this answer
Your $g(n)$ is clearly no bigger than the number of primes up to $2n$. For $n$ large, the number of primes less than $2n$ is roughly $2n/\log n$, which is much smaller than $n/8$. So the "quick and dirty" estimate can't be much good, once $n$ is large enough. Also, to the best of my knowledge, the Riemann Hypothesis has nothing to do with it. – Gerry Myerson Dec 21 '14 at 19:49
Mostly good points. As for the Riemann hypothesis, that's just speculation on my part. – Robert Soupe Dec 21 '14 at 21:10
The Prime Number Theorem tells us much more than Bertrand's Postulate; instead of one prime between $n$ and $2n$, there are asymptotically $n/\log n$ of them. And a careful consideration of the likelihood of matchups with primes between $1$ and $n$ leads to an estimate of $cn/(\log n)^2$ for $g(n)$, for a certain constant $c$. Have a look at the Wikipedia essay on the Goldbach conjecture. – Gerry Myerson Dec 22 '14 at 8:15
I'll take your word for it. I'm at that delicate halfway point between mathematical ignorance and expertise that makes me very susceptible to information poisoning from Wikipedia. – Robert Soupe Dec 22 '14 at 13:04
You guys, you're basically in agreement on the essential point here: as $n$ gets larger, so does the number of potential Goldbach sums. A quick and dirty estimate is just that, and not a tight upper or lower bound. But Gerry, I think you'd do well to post your own answer. Another way of saying the same thing is that a Goldbach failure number is probably less likely to exist than an odd perfect number. – Lisa Dec 22 '14 at 17:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.