2
Fig. 2
For example for a 2-step stair the formula is always 3x plus something, therefore to find the co-efficient of x, in this case 3, I would substitute the step size, in this case 2, into the triangular formula:
2(2+1) = 4+2 = 6 = 3
2 2 2
Therefore this equation works for a 2-step stair as the end result was 3. I then went on to check if this formula worked with other sized stairs. Another example I used was a 3-step stair for which the formula is always 6x plus something. Once again I substituted in the step size into the triangular formula to check if it was correct:
3(3+1) = 9+3 = 12 = 6
2 2 2
Therefore this formula is correct for calculating the co-efficient of x so the first part of my equation shall be:
[ n(n+1) ] x
[ 2 ]
Where n = step size
x = number in the bottom left corner of the stair
Now I have found out how to calculate the co-efficient of x using a formula I shall look into finding a formula to calculate the end part of my original formulas:
eg. for a 3-step stair on a 10×10 grid: 6x + 44 or 6x + 4g + 4
I will keep the equation in the simpler form where there is an addition of just a number and put this information into tables to make it clearer to notice a pattern (Tables 3 and 4). I shall call this number I am trying to find y. Firstly I created the following tables:
Table 3
As grid size increases by 1, y increases by 0
As grid size increases by 1, y increases by 1
As grid size increases by 1, y increases by 4
As grid size increases by 1, y increases by 10
As grid size increases by 1, y increases by 20
Table 4
Multiples of 9
Multiples of 10
Multiples of 11
Multiples of 12
(Both tables show the same information, just laid out differently.)
I then went on to work out the equation by finding the nth term, using my y values for an 8×8 size grid. I took all the y values for an 8×8 size grid and set them out as follows to find the nth term of the number pattern.
1st difference +9 +27 +54 +90
2nd difference +18 +27 +36
3rd difference +9 +9
From this I can see that the nth term will be cubic as it is the 3rd difference that is the same. This means my nth term will use the formula:
an³ + bn² + cn + d
I then carried on to find out the values for a, b, c and d for my cubic equation:
When n = 1
a + b + c + d = 0 1
When n = 2
8a + 4b + 2c + d = 9 2
When n = 3
27a + 9b + 3c + d = 36 3
When n = 4
64a + 16b + 4c + d = 90 4
Using these equations I then subtracted equation 1 from equation 2:
7a + 3b + c = 9 1
I then subtracted equation 2 from equation 3:
19a + 5b + c = 27 2
I then subtracted equation 3 from equation 4:
37a + 7b + c = 54 3
Now using these 3 new equations:
2 – 1:
12a + 2b = 18 1
3 – 2:
18a + 2b = 27 2
I then subtracted equation 1 from equation 2 to find the value of a:
6a = 9
Therefore a = 9
6
Now I can substitute a into my previous equations to find the value of b:
Sub. a in 1:
9 + b + c + d = 0
6
b + c + d = -9 1
6
Sub. a in 2:
12 + 4b + 2c + d = 9
4b + 2c + d = -3 2
Sub. a in 3:
243 + 9b + 3c + d = 36
6
9b + 3c + d = -27 3
6
Sub. a in 4:
96 + 16b + 4c + d = 90
16b + 4c + d = -6 4
Then I did:
2 – 1
3b + c = -9 1
6
3 – 2
5b + c = -9 2
6
4 – 3
7b + c = -9 3
6
Then I subtracted equation 1 from equation 2:
2b = 0
Therefore b = 0
Now I can substitute b into my previous equations to find the value of c:
Sub. b in 1:
0 + c + d = 0
c + d = 0 1
Sub. b in 2:
0 + 2c + d = -3
2c + d = -3 2
Sub. b in 3:
0 + 3c + d = -27 3
6
I then did:
2 – 1:
c = -9
6
Now I can substitute c into my previous equations to find the value of d:
Sub. c in 1:
-9 + d = -9
6 6
Therefore d = 0
From all of my workings to find the nth term I found out that in my formula;
an³ + bn² + cn + d
a = 9 b = 0 c = -9 d = 0
6 6
leaving me with a final cubic formula of:
9 n³ - 9 n
6 6
This formula was to find the y value in my original formulas therefore I need to combine it with my formula for finding the co-efficient of x:
[ n(n+1) ] x + [( 9 ) n³ - ( 9 ) n ]
[ 2 ] [( 6 ) ( 6 ) ]
Where n = step size and x = number in the bottom left corner of the stair
This formula is for any size stair but on an 8×8 grid only. I know this because from previous work I have done on finding the nth term for cubic equations I realised that in the cubic equation, an³ + bn² + cn + d, a always equals the 3rd difference divided by 6., so in this case the 3rd difference is 9, making a equal 9 over 6. As my y values are different for each sized grid, they would all have a different number for their 3rd difference, meaning a different number divided by 6. From Table 4, which I created earlier, I noticed that in the example I used to find the nth term of, the 3rd difference for my y values was 9 and that the y values for an 8×8 grid are always a multiple of 9. The y values on other sized grids were also always multiples of the same number. On a 9×9 grid, the y values were always a multiple of 10, 10×10 grid were multiples of 11, and 11×11 grid were multiples of 12. I can see from this that they are always multiples of the grid size plus 1 (g + 1). As I noticed earlier that for my y values on an 8×8 grid the 3rd difference was 9 which was also the number that all the y values are multiples of, I went on to see if the 3rd difference for the y values on a different sized grid was the same as the number they were all multiples of. I checked if the 3rd difference for the y values on a 9×9 grid was 10 as the y values for a 9×9 grid are all multiples of 10:
1st difference +10 +30 +60 +100
2nd difference +20 +30 +40
3rd difference +10 +10
This was the case, therefore the 3rd difference, which is also the number divided by 6 in my equation is always grid size plus 1, therefore in my equation would be:
[ n(n+1) ] x + [ ( g + 1 ) n³ - ( g + 1 )n ]
[ 2 ] [ ( 6 ) ( 6 ) ]
Where n = step size, x = number in the bottom corner of the stair and g = grid size
I then simplified this equation:
[ n(n+1) ] x + [ g + 1( n³ - n ) ]
[ 2 ] [ 6 ]
This is the formula for any sized step stair on any size grid.
I then went on to try this formula on a different size step stair on a different size grid to prove and check that it works. The example I used was a 3-step stair on a 10×10 grid with the number in the bottom left of the step shape being 25. The stair total for this step stair should equal 194. I substituted my example into my formula to calculate the stair total to see if this answer was given:
[ n(n+1) ] x + [ g + 1( n³ - n ) ] = Stair Total
[ 2 ] [ 6 ]
[ 3(3+1) ] 25 + [ 10 + 1( 3³ - 3 ) ] = Stair Total
[ 2 ] [ 6 ]
[ 9+3 ] 25 + [ 11 (27 - 3 ) ] = Stair Total
[ 2 ] [ 6 ]
[ 12 ] 25 + [ ( 11 )24 ] = Stair Total
[ 2 ] [ ( 6 ) ]
150 + 44 = Stair Total
194 = Stair Total
This proves that my formula works as it produced the correct stair total for a 3-step stair on a 10×10 grid.