Sunday, 18 January 2015

Prime numbers and Square numbers

In maths, we have been learning about prime numbers and square numbers. Obviously, there is no way the same number can be both a prime number and a square number. The picture below shows that this is the case for numbers up to 100, but can you explain why it is the case for any number?

However, my Dad has told me that there is an amazing link between square numbers and prime numbers. If a prime number is 4 times something + 1, then it is always the sum of two square numbers added together. This is true for all prime numbers!

This was first proven by the famous mathematician Euler (remember the Konigsberg Bridge problem?).

Here are some examples that we made using a spreadsheet:

Can you find some more examples?

It is also true that if a prime number is 4 times something + 3, then it never equals the sum of two square numbers added together. This is quite easy to prove. Can you prove it?


  1. A square number is a product of 2 same numbers. It means, the square number is a product of a single number and the same number again. For example, 9 is product of 3 two times 3 x 3. 64 is product of 8 x 8.
    A Prime number is divisible by 1 or itself. But a square number is divisible by another number 2 times. Like 9 divisible by 3 with the answer 3.
    So, they cannot be the same.

    1. You've explained why the same number can't be both square and prime really well, Shriya!

  2. Thank you so much for posting this, Holly! When you told me about it in class, there wasn't quite enough time for me to get my head round it, but now I see it... it's wonderful!

    I'm just wondering about why there should be this pattern....

  3. I like your post! Here are some examples of the same link between Square numbers and prime numbers:
    - 4 x 4 + 1 = 17 (Prime number) = 16 + 1 (Square numbers)
    - 4 x 9 + 1 = 37 (Prime number) = 36 + 1 (Square numbers)
    - 4 x 15 + 1 = 61 (Prime number) = 36 + 25 (Square numbers)

    1. I like it lots too! And I had to do what you've just done, and try it out with some of the other primes that fit the pattern. There seem to be quite a lot of them, Holly-primes, if I can call them that!

  4. Holly, I love the way you are investigating and talking about square numbers and primes. Year 6 are doing this too at the moment. Maybe they could try and answer your problem? Well done,
    Mrs Patrick