Learn

One very interesting number pattern is Pascal’s Triangle (named after Blaise Pascal, a famous French Mathematician and Philosopher). To build the triangle, start with a ‘1’ at the top, then continue placing numbers below it in a triangular pattern. Each number is the sum of the numbers directly above it.

Pascal’s Triangle conceals a huge number of patterns. One elegant pattern is that the sum of entries in row n equals 2n-1.

The hockey stick pattern of Pascal’s triangle is fascinating too. When you descend diagonally at first, then slant to form the shape of a hockey stick, the number in the slanted portion is the sum of the numbers that descended diagonally. Some hockey-stick-like patterns are highlighted here. Let us look at the orange pattern. It starts at row 3 and descends - down the third diagonal - up to row 6. It then slants into the 7th row. The number in the 7th row (20) is the sum of the numbers in rows 3 to 6:

20 = 1 + 3 + 6 + 10

The following are the patterns shown in the image:

20 = 1 + 3 + 6 + 10 (red pattern, descending down the third diagonal)

55 = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 (blue pattern on second diagonal), also the sum of first n natural numbers!

1001 = 1 + 10 + 55 +220 + 715 (green pattern)

As you can see, there are more hockey stick patterns than just the ones displayed.

Instructions

Can you find a hockey stick pattern that starts at the 4th row and goes down 6 rows?

Start at the 1 in the fourth row. Move down diagonally, passing the numbers 4, 10, 20, ... After you cross six numbers, slant down like a hockey stick. The first number you encounter will be the sum of the previous six numbers.

Answer: 1 + 4 + 10 + 20 + 35 + 56 = 126

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?