This algorithm uses Pascal's Triangle as a model for generating a series of integers derived from the sums of other integers. There are two primary steps for generating a triangle, which users can called their own.

Step **A**, identify the number of rows for the triangle you wish to create. This option determines the size of the triangle and the number of integers generated in the algorithm output.

Step **B**, insert the numbers that extend along the sides of the triangle. These are also the numbers that form the top of the triangle. If you wish to create Pascal's Triangle you should use the default settings with 1's. You can take advantage of this option to create your own unique triangle.

**Background**

** Pascal's Triangle** is a triangular pattern of numbers created by an infinite binomial expansion. Pascal's Triangle starts at the top with three 1's in the form of a right-angled or equilateral triangle. The 1's extend along the sides of the triangle. Therefore, each row of the triangle will begin and end with the same integers found at the top. Each intermediate number in a row is determined by the sum of the two numbers above it. For example, if the second row from the top of the triangle has two 1's, you will find the sum (1+1) below. Therefore, the third row will be 1 2 1 determined by 1 (1+1) 1. The fourth row is 1 3 3 1 determined by 1 (1+2) (2+1) 1 and so on.

Although references to the triangle date back to 450 BC, the triangle was made popular by Blaise Pascal in his *Traite du Triangle arithmetique* from 1655. Pascal's triangle is widely used in binomial expansions and probability theory.

Pascal's Triangle is similar to a magic square in the sense that it has many interesting properties:

1) the triangle is symmetrical with each row creating a palindrome

2) each number is the sum of the two nearest numbers

3) the sum of numbers in each row is a product of the power of 2 (i.e. 2 to the power n), for example, 1+4+6+4+1 = 16 which is 2 to the power 4 (although there are five numbers present in this example, the value of n begins at zero)

4) each diagonal sequence reveals coefficients of the expansion

5) the second diagonal lines, from the sides, contain natural numbers in order (1,2,3,4...)

6) the third diagonal lines, from the sides, contain triangular numbers in order (1,3,6,10,15...)

7) the sum of certain diagonals from the triangle produce Fibonacci numbers, and rows that begin with odd numbers produce Catalan numbers expressed as (n+1)/2