The Parkside triangle is a mathematical model that generates a triangle of numbers given two variables, size and seed. The program can be used to present the fundamentals of loop logic.
The Parkside triangle is a mathematical model that generates a triangle of numbers given two variables, size and seed. The dimension variable, N, must satisfy the following condition: 1
The number N represents the rows of the triangle. If N = 5, then there are 5 lines that make up the triangle. The first row of the triangle cannot contain empty numbers in it. All positions must contain a number greater than or equal to 1. The other variable is the seed, S, which represents the first number in the first row of the triangle. The seed must meet the following conditions: 1
When the size and seed variables are known, this particular model is produced. An example would look like this:
Size = 4 Seed = 1
1 2 4 7
+ 3 5 8
6/9
1
Size = 5 Seed = 3
3 4 6 9 4
5 7 1 5
+ 8 2 6
3/7
8
The pattern of numbers to create the triangle counts from the left of the bottom row and then moves to the right and down. Each time the next row is added, all numbers count from the first row down. In both directions, the Parkside triangle will contain the same number of lines.
Many computer programming classes in languages like C use a sample program to create this model for any size and seed. The program will read the size and seed and output the correct pattern of numbers. This is accomplished by using loop logic and basic arithmetic alongside programming skills and can be used to present the fundamentals of loop logic.
Other than the specified size and condition of the seed to start creating the pattern, there are no other limits to the Parkside Triangle. In each iteration, it will have no more than 20 rows and a starting number of no more than 9. As shown in the example triangle above, there are no zeros either.
Protect your devices with Threat Protection by NordVPN