5. Recursion and Iteration
Sign In
| Figure | Number of Triangles |
|---|---|
| 1 | 1 |
| 2 | 4 |
| 3 | 10 |
| 4 | 19 |
| 5 | 31 |
| 6 | 46 |
| Figure | Number of Triangles |
|---|---|
| 1 | 1 |
| 2 | 4 |
| 3 | 10 |
| 4 | 19 |
| 5 | 31 |
| 6 | 46 |
| Figure | Number of Triangles |
|---|---|
| 1 | a_1=1 |
| 2 | a_2=4=1+3* 1=a_()darkorange1+3* 1 |
| 3 | a_3=10=4+3* 2=a_()darkorange2+3* 2 |
| 4 | a_4=19=10+3* 3=a_()darkorange3+3* 3 |
| 5 | a_5=31=19+3* 4=a_()darkorange4+3* 4 |
| 6 | a_6=46=31+3* 5=a_()darkorange5+3* 5 |
| ... | ... |
| n+1 | a_(n+1)=a_()darkorangen+3n |
Since a_1=1, we can write a recursive rule for a_n. Recursive Rule: a_1=1, a_(n+1)=a_n+3nforn≥ 1
| n | a_(n+1)=a_n+3n | a_n+3n | a_(n+1) |
|---|---|---|---|
| 0 | a_1=1 | - | a_1= 1 |
| 1 | a_2= a_1+3* 1 | 1+3* 1 | a_2= 4 |
| 2 | a_3= a_2+3* 2 | 4+3* 2 | a_3= 10 |
| 3 | a_4= a_3+3* 3 | 10+3* 3 | a_4= 19 |
| 4 | a_5= a_4+3* 4 | 19+3* 4 | a_5= 31 |
| 5 | a_6= a_5+3* 5 | 31+3* 5 | a_6= 46 |
| 6 | a_7= a_6+3* 6 | 46+3* 6 | a_7= 64 |
| 7 | a_8= a_7+3* 7 | 64+3* 7 | a_8= 85 |
| 8 | a_9= a_8+3* 8 | 85+3* 8 | a_9= 109 |
| 9 | a_(10)= a_9+3* 9 | 109+3* 9 | a_(10)=136 |
Therefore, the number of triangles in Figure 10 is 136.
Let's enter n
in cell A1, a(n+1)
in cell B1, 0 in cell A2, and a_1=1 in cell B2. Then, write =A2+1
in cell A3. When we hit enter, we will get the following.
Next, copy cell A3, highlight cells A4 through A11, and paste.
Now, write =B2+3*A3
in cell B3. When we hit enter, we will get the following.
Next, copy cell B3, highlight cells B4 through B11, and paste.
Therefore, from the 11^(th) row in the spreadsheet we can get that a_(10)=136. This tells us that the number of triangles in Figure 10 is 136.