Showing posts with label perfect squares. Show all posts
Showing posts with label perfect squares. Show all posts
Sunday, January 27, 2013
The 3-4-5 triangle
The Pythagorean Theorem is often stated as
a² + b² = c²
means that the sum of the squares of the lengths of the two short sides (the ones that meet to create the right angle) is equal to the square of the length of the long side opposite the 90°, the side known as the hypotenuse.
If you pick two whole numbers at random to be the short sides, also known as the legs, the hypotenuse will be a square root of a whole number.
For example: If a = 1 and b = 3, 1² + 3² = 10, which means c² = 10. 10 is not a perfect square, so c is equal to the irrational number the square root of 10, which I will write as sqrt(10).
If we are looking at one digit numbers only, we have just one pair of legs that will add up to a perfect square. 3² + 4² = 9 + 16 = 25 = 5².
Three whole numbers that satisfy a² + b² = c² are called a Pythagorean triple. If we find such a triple, we can create infinitely more by multiplying all the sides by the same whole number. Here are some examples.
Multiply 3-4-5 by 2: 6² + 8² = 10²
Multiply 3-4-5 by 3: 9² + 12² = 15²
Multiply 3-4-5 by 4: 12² + 16² = 20²
...
All of these triangles are similar and when discussing Pythagorean triples, the ones that are relatively prime are a special case.
The Pythagorean Theorem is named for the ancient Greek mathematician Pythagoras (570-495 BCE), but as often happens in math, this does not mean he was the first person ever to notice the pattern. There is strong evidence that the ancient Egyptians who built the pyramids understood the 3-4-5 triangle at the very least, and they lived thousands of years before Pythagoras. In many archeological digs, among the building tools are three sticks of lengths with the ratio 3:4:5. It is assumed that the builders used these when constructing walls to make sure the walls and the floors met at 90° angles.
There are other relatively prime Pythagorean triples; in fact, there are infinitely many. The next two smallest ones are 5² + 12² = 13² and 8² + 15² = 17².
Tomorrow, we will discuss how to create all the Pythagorean triples, both those that are relatively prime and those that aren't.
Sunday, January 13, 2013
Sum of two squares and the prime numbers of the form 4k+1
Repeating the definition of prime numbers.
Definition: A prime number p is a positive integer that has exactly two factors, 1 and p itself.
2 is the only even prime. Other small primes include 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37... The list goes on forever as there is no largest prime number.
One way to split up the odd primes is to divide by 4 and check the remainder.
With 3, 4 goes in 0 times with remainder 3.
With 5, 4 goes in 1 time with remainder 1.
With 7, 4 goes in 1 time with remainder 3.
With 11, 4 goes in 2 times with remainder 3.
With 13, 4 goes in 3 times with remainder 1.
With 17, 4 goes in 4 times with remainder 1.
With a little thought, it's easy to convince yourself that the only options for the remainder are 1 and 3, so we can split the odd primes into two camps, the 4k + 1 primes {5, 13, 17, 29, ...} and the 4k + 3 primes {3, 7, 11, 19, 23...}.
Let's look at perfect squares. An even number can always be written 2k, while an odd number can be written as 2k+1. Here's what happens when we square even numbers and odd numbers.
(2k)² = 4k²
(2k+1)² = 4k² + 4k + 1
What this tells us is that even perfect squares are not just divisible by 2, but also divisible by 4. Take a look at 4, 16, 36, 64, 100, 144, etc. if you need convincing.
For the odd squares (1, 5, 9, 25, 49, 81, etc.) you will always get the remainder of 1 when you divide by 4.
Fact with easy proof: No prime of the form 4k + 3 can be the sum of two squares.
Even square + even square = divisible by 4
Even square + odd square = remainder of 1 when dividing by 4
Odd square + odd square = remainder of 2 when dividing by 4
So the sum of two squares when divided by 4 can have remainder 0, 1 or 2, but not 3.
Fact with much harder proof: Every prime of the form 4k + 1 can be written as the sum of two squares and the choice of the two squares, one even and one odd, is unique for each prime.
Let me show you the first few examples.
5 = 2²+ 1² = 4 + 1
13 = 2²+ 3² = 4 + 9
17 = 4²+ 1² = 16 + 1
29 = 2²+ 5² = 4 +25
37 = 6²+ 1² = 36 + 1
41 = 4²+ 5² = 16 +25
This is not an easy proof and beyond the scope of what I want to discuss on the blog. To me, this is one of those remarkable things you can discover in higher mathematics. It's remarkable that it works for every prime of the form 4k+1 and doubly remarkable that the solution is unique for each prime of that form.
Tomorrow: Fun with Pascal's Triangle.
Saturday, January 12, 2013
A pattern within the perfect squares.
The perfect squares are the numbers that are the result of multiplying a whole number by itself.
On Tuesday, we saw that every perfect square is the sum of two consecutive triangular numbers, such as 21 + 15 = 36 = 6², illustrated below with 21 black asterisks (6+5+4+3+2+1) and 15 red asterisks (1+2+3+4+5).
* * * * * *
* * * * * *
* * * * * *
* * * * * *
* * * * * *
* * * * * *
Here is another summation method that gives us the perfect squares, once again illustrated with squares made from asterisks, starting with 1² = 1.
*
2² = 4 = 1 + 3.
* *
* *
3² = 9 = 1 + 3 + 5.
* * *
* * *
* * *
4² = 16 = 1 + 3 + 5 + 7.
* * * *
* * * *
* * * *
* * * *
The most direct way to state this is n² is the sum of the first n odd numbers or n² = 1 + 3 + ... + (2n - 1).
Taking the sum of a pattern of numbers is very common in math, so we took the capital Greek letter sigma as the symbol for summation. Blogger software doesn't have an easy way for me to write sigma correctly, so I will add a picture.
The big thing at the front that looks like an M lying on its side is the sigma. I also introduced a new variable k, which is the counting variable. The symbols above and below the sigma mean "k starts at 1, and increases by 1 each time until it gets to n, then we stop". The (2k - 1) shows the things we are adding together.
When k = 1, then 2(1) - 1 = 1.
When k = 2, then 2(2) - 1 = 3.
When k = 3, then 2(3) - 1 = 5.
When k = 4, then 2(4) - 1 = 7.
etc. ...
Tomorrow: a pattern concerning squares and the prime numbers of the form 4k + 1.
Tuesday, January 8, 2013
Triangular numbers
We learn the perfect squares in school. Here are the first few starting with 1² = 1.
1² = 1
*
2² =4
* *
* *
3² = 9
* * *
* * *
* * *
4² = 16
* * * *
* * * *
* * * *
* * * *
5² = 25
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
Another series of numbers base on shape are the triangular numbers. Here are the first five examples starting with 1.
*
1 = 1, the 1st triangular number
*
* *
1+2 = 3, the 2nd triangular number
*
* *
* * *
1+2+3 = 6, the 3rd triangular number
*
* *
* * *
* * * *
1+2+3+4 = 10, the 4th triangular number
*
* *
* * *
* * * *
* * * * *
1+2+3+4+5 = 15, the 5th triangular number
So the n-th triangular number is the sum of the numbers from 1 to n. There are games where these numbers show up, notably the ten pins in bowling and the fifteen balls other than the cue in pool. There are many places where these number show up in math, including the total number of handshakes necessary in a room with n+1 people so that every possible pair of people shakes hands. Let's look at the example with 5 people.
Person #1: Shakes hands with 4 people
Person #2: Already counted the handshake with #1, 3 people left.
Person #3: Already counted the handshakes with #1 and #2, 2 people left.
Person #4: Already counted the handshakes with #1, #2 and #3, 1 person.
Person #5: Already counted all the handshakes.
There is a formula for the n-th triangular number, which is ½[n(n + 1)].
Consider our idea called relatively prime, which we discussed yesterday.
Two consecutive square numbers are always relatively prime, like 4² and 5². This follows from the fact that any two consecutive numbers are relatively prime.
After the first pair of triangular numbers, namely 1 and 3, any two consecutive triangular numbers cannot be relatively prime.
Ignoring 1 and 3, the next pair are 3 and 6, which have 3 in common as a factor.
Next are 6 and 10, which have 2 in common.
Next, 10 and 15 have 5 in common as a factor.
The formula shows us the numbers are ½[n(n + 1)] and ½[(n + 1)(n + 2)]. If n is even, the common factor will be n + 1. If n is odd, the common factor will be ½(n + 1).
The square and triangular numbers have a connection. The sum of two consecutive triangular numbers is always a square.
1 + 3 = 4
3 + 6= 9
6 + 10 = 16
10 + 15 = 25
etc. ...
Here is a picture of 10 + 15 = 25 to give an idea why this always works.
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
Tomorrow: the Fibonacci numbers.
Subscribe to:
Posts (Atom)

