Skip to main content
Home
plus.maths.org

Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • Main navigation

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • For

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

    Popular topics and tags

    Shapes

    • Geometry
    • Vectors and matrices
    • Topology
    • Networks and graph theory
    • Fractals

    Numbers

    • Number theory
    • Arithmetic
    • Prime numbers
    • Fermat's last theorem
    • Cryptography

    Computing and information

    • Quantum computing
    • Complexity
    • Information theory
    • Artificial intelligence and machine learning
    • Algorithm

    Data and probability

    • Statistics
    • Probability and uncertainty
    • Randomness

    Abstract structures

    • Symmetry
    • Algebra and group theory
    • Vectors and matrices

    Physics

    • Fluid dynamics
    • Quantum physics
    • General relativity, gravity and black holes
    • Entropy and thermodynamics
    • String theory and quantum gravity

    Arts, humanities and sport

    • History and philosophy of mathematics
    • Art and Music
    • Language
    • Sport

    Logic, proof and strategy

    • Logic
    • Proof
    • Game theory

    Calculus and analysis

    • Differential equations
    • Calculus

    Towards applications

    • Mathematical modelling
    • Dynamical systems and Chaos

    Applications

    • Medicine and health
    • Epidemiology
    • Biology
    • Economics and finance
    • Engineering and architecture
    • Weather forecasting
    • Climate change

    Understanding of mathematics

    • Public understanding of mathematics
    • Education

    Get your maths quickly

    • Maths in a minute

    Main menu

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • Audiences

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

    Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • Mathematical mysteries: Goldbach revisited

    1 May, 1998
    13 comments
    May 1998

    Since we first wrote about the Goldbach conjecture (see Mathematical mysteries: the Goldbach conjecture), we have had many requests for more information about it, and about how our Goldbach calculator works. We can answer some of your questions here but the Goldbach conjecture touches on a strange area of maths that may leave you even more curious than before...

    To recap, Goldbach started this quest in a letter to Euler in 1742. The conjecture we know today is not the one he first proposed though Euler showed it to be equivalent. In his letter, Goldbach made the following assertion:

    Every whole number greater than 5 can be written as the sum of three primes.

    Clearly the first few cases are easy to write down:

    • 6 = 2+2+2
    • 7 = 2+2+3
    • 8 = 2+3+3

    We can break down this assertion into two separate assertions as follows:

    1. Every even number greater than 4 is the sum of three primes
    2. Every odd number greater than 5 is the sum of three primes

    Let's look at (1) more closely. To add three numbers and get an even number requires either 3 even numbers to start with or two odd numbers and an even number. However, there is only one even prime: 2. Therefore, (1) is just the same as saying that every even number greater than 2 is the sum of two primes.

    (2) is even simpler. If we have an odd number greater than 5 we can always subtract 3 (a prime) and get an even number greater than 2. (1) says that this number must be the sum of two primes so, adding our 3 back again gives three primes that sum to our odd number.

    We can now state the problem in its more usual form:

    Every even number greater than 2 is the sum of two primes.

    It is suggested that although Euler simplified Goldbach's conjecture he didn't see it as worth spending time proving.

    This issue's mystery

    Here is another unproved statement about primes that is very similar to the Goldbach conjecture:

    Every even number can be expressed as the difference of two primes.

    At first sight, it looks very similar to the Goldbach conjecture but there is an important difference. To find out why you'll need to know a little more about how our Goldbach calculator works.

    Inside the Goldbach calculator

    Some readers have asked us how the Goldbach calculator published in Issue 2 works.

    The procedure or algorithm used by the calculator is described below:

    Given an even number: n, find all prime pairs p1+p2 = n.

    The algorithm is divided into two halves. Firstly we create a list of all primes from 2 up to n. Secondly we search this list exhaustively to find all the prime pairs.

    Finding primes

    To list all the primes up to n we use a method known as "the sieve of Eratosthenes". This method is best visualized by drawing a square grid with at least n boxes and numbering them starting with 1 in the top-left corner and working down to the bottom-right corner. The idea is to mark (say be colouring in) all the boxes which belong to non-primes. To do this proceed as follows:

    1. Mark the box number 1, which is not prime by definition.
    2. Set p to 2.
    3. Starting from box number p, count p boxes forward and mark the box you stop on, then count p boxes forward again and mark again. Repeat this process until you run out of boxes.
    4. Starting from box p again, scan forward until you get to the next unmarked box. Change the value of p to the number in this box and return to (3).

    The clever twist to this method is that in (4), once you've used all the unmarked boxes in the first row of your grid you're done! The boxes left unmarked in the grid are the prime numbers.

    The sieve of Eratosthenes applied to a simple 5x5 grid.

    The sieve of Eratosthenes applied to a simple 5x5 grid.

    Finding prime pairs

    Once we have a list of primes, we can find the prime pairs as follows:

    1. Set p1 to the first (smallest) prime in the list.
    2. Set p2 to the last (largest) prime in the list.
    3. If p1>p2 we're done.
    4. If p1+p2<n then set p1 to the next prime in the list and return to (3).
    5. If p1+p2>n then set p2 to the previous prime in the list and return to (3).
    6. Otherwise p1+p2 must equal n. Record this prime pair. Set p1 to the next prime in the list and p2 to the previous prime in the list and return to (3).

    Finding prime triples

    The method above extends easily to find the prime triples for a number n as follows:

    1. Set p1 to the first (smallest) prime in the list.
    2. Set p2 to p1.
    3. Set p3 to the last (largest) prime in the list.
    4. If p2>p3 set p1 to the next prime in the list and return to (2).
    5. If p1+p2+p3<n then set p2 to the next prime in the list and return to (4).
    6. If p1+p2+p3>n then set p3 to the previous prime in the list and return to (4).
    7. Otherwise p1+p2+p3 must equal n. Record this prime triple. Set p2 to the next prime in the list and p3 to the previous prime in the list and return to (4).

    The above procedure terminates when we run out of primes for p1 in (4).

    The mystery deepens

    Does our algorithm for finding the Goldbach triples always stop? Yes it does. For each value of n we're given we build a finite list of primes and scan this list to find the pairs/triples that sum to it.

    In principle, even if we removed the constraint on the size of the number entered our program would always take a finite number of steps. It doesn't matter if the Goldbach conjecture is true or not. If we stumbled upon a number which could not be broken down into the sum of three primes our program would simply terminate without having printed out any triples but still in a finite number of steps.

    Now let's look again at this issue's mystery. Namely that every even number, n, can be expressed as the difference of two primes. Clearly there could be many possible pairs that have this property for n so we'll restrict ourselves to finding just the first pair. How would we write an algorithm to find it?

    We can no longer search a finite list of primes for this pair because there is no restriction on the size of the pair, only on their difference. If we were to write a program for this problem it would have to generate primes as it went along. Unfortunately, as long as the proposition remains unproved we can never be sure that our search will succeed. Our program may go on forever!

    This question of whether or not a given computer program is guaranteed to stop has major mathematical implications and is discussed further in "What computers can't do" elsewhere in this issue.

    • Log in or register to post comments

    Comments

    Anonymous

    10 August 2010

    Permalink

    infinity is prime? only dividable by one and itself. Also all primes after 2 are odd.
    infinity + infinity =infinity
    Which means infinity is even [odd+odd=even, then even+even=even].
    Q.E.D.

    - Matt {AKA Fuzzy Logic}

    • Log in or register to post comments

    Anonymous

    5 November 2013

    In reply to Proof by Anonymous

    Permalink

    Infinity is not a number, but a concept.

    • Log in or register to post comments

    Anonymous

    5 January 2014

    In reply to Proof by Anonymous

    Permalink

    I'm pretty sure sure you're joking, and so to continue this *joke*:

    let's subtract each side by infinity? We now have infinity = 0 & -infinity = 0
    since all numbers are b/w infinity and -infinity (exclusive) -->
    all numbers don't exist (can't be greater, less, or equal to 0)

    pretty cool...

    • Log in or register to post comments

    Anonymous

    4 December 2014

    In reply to Proof by Anonymous

    Permalink

    Infinity is not a prime because two times infinity is infinity, and three times infinity is infinity, and so on, and also infinity is even. However, if infinity is prime then infinity is two.

    • Log in or register to post comments

    Anonymous

    17 February 2020

    In reply to Proof by Anonymous

    Permalink

    That is horribly false. There are different types of infinity, and infinity is not a number that you can manipulate as such. The sense in which we say that "infinity + infinity = infinity" is if we have two functions that grow without bound, and you sum both, you'll get a function that grows without bound. And the same goes for products.

    • Log in or register to post comments

    Anonymous

    17 December 2015

    Permalink

    prime triples is not working for 55

    • Log in or register to post comments

    MOHAMMAD DAUD

    10 June 2016

    In reply to prime triples is not working for 55 by Anonymous

    Permalink

    1+13+41

    • Log in or register to post comments

    Galamo Monkam

    26 August 2016

    In reply to SORRY ,you are wrong bro by MOHAMMAD DAUD

    Permalink

    55=11+13+31

    • Log in or register to post comments

    Malay Kumar Rana

    20 September 2016

    In reply to SORRY ,you are wrong bro by MOHAMMAD DAUD

    Permalink

    1 is not a prime no. the answer is 2+11+41. thank you

    • Log in or register to post comments

    (name not found)

    16 May 2019

    In reply to SORRY ,you are wrong bro by Malay Kumar Rana

    Permalink

    2+11+41 = 54, not 55.

    • Log in or register to post comments

    MrFoo

    30 June 2019

    In reply to SORRY ,you are wrong bro by Malay Kumar Rana

    Permalink

    That equals to 54.

    • Log in or register to post comments

    MrFoo

    30 June 2019

    In reply to SORRY ,you are wrong bro by MOHAMMAD DAUD

    Permalink

    1 is not prime

    • Log in or register to post comments

    Anonymous

    31 March 2016

    Permalink

    Does this make sense NextPrime = 2^n + any prime? Can it be proved?
    If so then could a new Prime definition could be :
    Assuming 1 is a prime then all primes are found by 2^n + any prime
    Can this be proved?

    Combine my prior comment if desired.

    • Log in or register to post comments

    Read more about...

    Goldbach conjecture
    Mathematical mysteries

    Our Podcast: Maths on the Move

    Our Maths on the Move podcast brings you the latest news from the world of maths, plus interviews and discussions with leading mathematicians and scientists about the maths that is changing our lives.

    Apple Podcasts
    Spotify
    Podbean

    Plus delivered to you

    Keep up to date with Plus by subscribing to our newsletter or following Plus on X or Bluesky.

    University of Cambridge logo

    Plus is part of the family of activities in the Millennium Mathematics Project.
    Copyright © 1997 - 2025. University of Cambridge. All rights reserved.

    Terms