## The Binomial Theorem and Pascal’s Triangle

February 24th, 2010 by Math Tricks | 20 Comments | Filed in Math Patterns, Math Tricks, Pascal's Triangle

``` // <![CDATA[ google_ad_client = "ca-pub-2176115693811858"; /* The Binomial Theorem and Pascal’s Triangle */ google_ad_slot = "6472300794"; google_ad_width = 468; google_ad_height = 60; // ]]&gt; // <![CDATA[ // ]]&gt; ```

Back in grade school, I was first introduced to the Binomial Theorem.  The title alone was quite enough to intimidate me, let alone the seemingly impossible to understand equations involved with it.

I’ll not go into the mathematics of the binomial theorem here.  Instead, I’ll introduce you to math tricks which can be used instead.  First, let me refresh your mind on why we were taught the binomial theorem.  Remember when you were asked to expand the equation:

(x + y)2

If you recall, this equation can be expanded to the equivalent equation:

x2 + 2xy + y2

The binomial theorem will allow you to solve a higher order problem of the example above.  For instance, what is the expansion of the equation:

(x + y)5

Generally, an equation of this type can be expanded as:

where c1, c2, … are the binomial coefficients in the expansion.   So given any n, you can determine the expansion without the coefficients.  Expanding our example above:

(x + y)5 = c1x5y0 + c2x4y1 + c3x3y2 + c4x2y3 + c5x1y4 + c6x0y5

So how do you determine the binomial coefficients?  You can determine the binomial coefficients individually using the equation:

for k=0 to k=n.  This works fine, but is a little bit cumbersome – especially for large values of n!  So what is the math trick to solve this quickly?

Before I can answer this, I have to introduce to you Pascal’s Triangle.  Pascal’s triangle is a mathematical progression which is determined by constructing a triangle with numbers using a very simple algorithm.  First, take a look at this example of Pascal’s triangle:

At the very top is row 0, which is simply a 1.  In row 1, there are two numbers, both 1s.  In row 2, there are three numbers: 1, 2, and 1.  Notice that the 2 in row two is the sum of the two numbers above it; this is how you determine the numbers in the triangle – simply add two side-by-side numbers to get the result below and between the numbers:

Construction of Pascal’s Triangle1

So how can you use Pascal’s triangle to find the binomial coefficients when you expand the equation (x + y)5?  First, notice that the equation is raised to the 5th power.  So now simply go to the 5th row of Pascal’s triangle (remember, the top row is row 0), and those numbers are the required coefficients:

1 5 10 10 5 1

And so,

(x + y)5 = x5y0 + 5x4y1 + 10x3y2 + 10x2y3 + 5x1y4 + x0y5

Quite a time saver!

For an alternative method of expanding polynomials, please check out The Easy Peasy Binomial Expansion Trick.

1File by Hersfold, en.wikipedia.org/wiki/User:Hersfold

## Math Patterns

October 12th, 2009 by Math Tricks | 5 Comments | Filed in Math Patterns

``` <!-- google_ad_client = "ca-pub-2176115693811858"; /* Math Patterns */ google_ad_slot = "1481016267"; google_ad_width = 468; google_ad_height = 60; //--> ```

## Math Patterns

This is the first post to the new category Math Patterns.  Here in this category, I will post many interesting math patterns; some of these are very well known, and some are obscure.  For many of these mathematical patterns, one can derive general formulas very easily by just carefully observing how the math pattern develops.  Other numeric patterns will have you pounding your head on your keyboard while trying to come up with the next number in the series.

So, I give you here the first in the series (pun intended!) of math patterns:

1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, 100, 103, 109, 129, 130, 133, 139, 167, 176, 188, 190, 192, 193, 203, 208, 219, 226, 230, 236, 239, 262, 263, 280, 291, 293, 301, 302, 310, 313, 319, 320, 326, 329, 331, 338, 356, 362, 365, 367, 368, 376, 379 . . .

Can you see the next number in the pattern?

Here is a subset of this math pattern:

7, 13, 19, 23, 31, 79, 97, 103, 109, 139, 167, 193, 239, 263, 293, 313, 331, 367, 379 . . .

The subset above is simply all of the prime numbers in the first set.  So then, what is the pattern of the first set?  This is the set of happy numbers up to and including 379.

So what the heck is a happy number?  A happy number is happy if you take each digit in the number, square them, add the squares together, and then repeat the process with the result and then eventually get the value 1.

For example, take the number 338.  First square each digit and add them together:

9 + 9 + 64 = 82

Now repeat the process with the result (82):

64 + 4 = 68

Continue the process with 68:

36 + 64 = 100

And then with 100:

1 + 0 + 0 = 1

Here the result is 1, and thus 338 is a happy number!

So what if a number is not happy?  Interestingly, an unhappy number ends up in a cyclic loop with the pattern:

4, 16, 37, 58, 89, 145, 42, 20, 4 . . .

So is there a limit to the number of happy numbers?  Happily, there are an infinite number of happy numbers – and an infinite number of unhappy numbers as well.