# Toothpick Squares Sequence for nth # toothpicks

#### artemishunts200

##### New member
Please help! I'm stuck on modeling the function for the # of toothpicks in the nth figure. Thank you so much. Renee

#### Jameson

Staff member
Please help! I'm stuck on modeling the function for the # of toothpicks in the nth figure. Thank you so much. Renee
Hi artemishunts200, Welcome to MHB. I think something is missing from your question. Is there a diagram in your book or some more info that you haven't posted yet? It will depend on the figures you are trying to draw.

Here's a video discussing this problem with where the figures are houses.

Jameson

EDIT: Sorry, I missed "squares" in your title. Still could use some more clarification because you could draw squares a bunch of different ways, depending on how they are connected.

Last edited:

#### artemishunts200

##### New member
Hi artemishunts200, Welcome to MHB. I think something is missing from your question. Is there a diagram in your book or some more info that you haven't posted yet? It will depend on the figures you are trying to draw.

Here's a video discussing this problem with where the figures are houses.

Jameson

EDIT: Sorry, I missed "squares" in your title. Still could use some more clarification because you could draw squares a bunch of different ways, depending on how they are connected.
I have looked at the diagram you've mentioned. My diagram begins with one square as fig. 1, then fig. 2 has a base of three squares with 1 square on top; fig. 3 has a base of five squares with the 2nd layer having three squares and the third layer having 1 square; figure 4. has a base of 7 squares, next layer has 5, next layer has 3, next layer has 1..... Does this help? I know this is not a linear pattern, and I know I am losing sides as squares are added. The question is how many toothpicks in all for the nth figure.​

#### Jameson

Staff member
I have looked at the diagram you've mentioned. My diagram begins with one square as fig. 1, then fig. 2 has a base of three squares with 1 square on top; fig. 3 has a base of five squares with the 2nd layer having three squares and the third layer having 1 square; figure 4. has a base of 7 squares, next layer has 5, next layer has 3, next layer has 1..... Does this help? I know this is not a linear pattern, and I know I am losing sides as squares are added. The question is how many toothpicks in all for the nth figure.
I'm not sure I can solve this for you but don't worry, someone will soon enough. We have very knowledgeable members. Just for clarification though, let me double check I get what you are describing.

1) 1 square: 4 toothpicks
2) 4 squares (this is where I need to know how you're arranging them): $(4 \cdot 4)-2-1=13$ This is assuming the middle square in bottom row of squares shares two toothpicks the squares on either side and the top square shares its bottom toothpick with the row below.

Is this how it looks? If not, you can upload images so you could draw one of the diagrams in paint in 2 minutes and upload it. I'll look into adding a chalkboard/whiteboard feature for drawing diagrams.

#### artemishunts200

##### New member
Last edited by a moderator:

#### Jameson

Staff member
Ok great. I think this enough for others to go on. Sit tight, someone else will hopefully help you soon enough. #### Sudharaka

##### Well-known member
MHB Math Helper
I have looked at the diagram you've mentioned. My diagram begins with one square as fig. 1, then fig. 2 has a base of three squares with 1 square on top; fig. 3 has a base of five squares with the 2nd layer having three squares and the third layer having 1 square; figure 4. has a base of 7 squares, next layer has 5, next layer has 3, next layer has 1..... Does this help? I know this is not a linear pattern, and I know I am losing sides as squares are added. The question is how many toothpicks in all for the nth figure.​
Hi artemishunts200, If you consider the number of toothpicks arranged horizontally and the number of toothpicks arranged vertically separately,

Figure 1 has $$1+1$$ toothpicks arranged horizontally and $$1\times 2$$ toothpicks arranged vertically.

Figure 2 has $$3+3+1$$ toothpicks arranged horizontally and $$(1+2)\times 2$$ toothpicks arranged vertically.

Figure 3 has $$5+5+3+1$$ toothpicks arranged horizontally and $$(1+2+3)\times 2$$ toothpicks arranged vertically.

Figure 4 has $$7+7+5+3+1$$ toothpicks arranged horizontally and $$(1+2+3+4)\times 2$$ toothpicks arranged vertically.

Therefore the nth figure has $$1+2(n-1)+\frac{n}{2}[2+2(n-1)]=n^2+2n-1$$ arranged horizontally and $$(1+2+\cdots+n)\times 2=n(n+1)$$ toothpicks arranged vertically.

Therefore the total number of toothpicks in the nth figure is, $$n^2+2n-1+n(n+1)=2n^2+3n-1$$.

Kind Regards,
Sudharaka.

#### soroban

##### Well-known member
Hello, Renee!

From your description, I think I understand the problem.

We have a "stack" of rows of squares.
The rows have consecutive odd numbers of squarea.
The squares are made of toothpicks.
How many toothpicks are used in the $$n^{th}$$ diagram?

Code:
                                                                       n=4

n=3                          * - *
|   |
n=2                  * - *                     * - * - * - *
|   |                     |   |   |   |
n=1          * - *             * - * - * - *             * - * - * - * - * - *
|   |             |   |   |   |             |   |   |   |   |   |
* - *     * - * - * - *     * - * - * - * - * - *     * - * - * - * - * - * - * - *
|   |     |   |   |   |     |   |   |   |   |   |     |   |   |   |   |   |   |   |
* - *     * - * - * - *     * - * - * - * - * - *     * - * - * - * - * - * - * - *
4             13                    26                            43
We have the sequence: .$$4,13,26,64,\;\text{ . . .}$$

Take the differences of consecutive terms,
then take the differences of the differences, and so on.

$$\begin{array}{|c|ccccccccc|}\hline \text{Sequence} & 4 && 13 && 26 && 43 && 64 \\ \hline \text{1st diff.} && 9 && 13 && 17 && 21 & \\ \hline \text{2nd diff.} &&& 4 && 4 && 4 && \\ \hline \end{array}$$

The second differences are constant.
Hence, the function is of the second degree . . . a quadratic.

The general quadratic function is: .$$f(n) \:=\:an^2 + bn + c$$

To find $$a,b,c$$, we use the first three values of $$f(n).$$

. . $$\begin{array}{ccccc}f(1) = 4: & a + b + c &=& 4 &  \\ f(2) = 13: & 4a + 2b + c &=& 13 &  \\ f(3) = 26: & 9a + 3b + c &=& 26 &  \end{array}$$

$$\begin{array}{ccccc}\text{Subtract -:} & 5a + b &=& 13 &  \\ \text{Subtract -:} & 3a + b &=& 9 &  \end{array}$$

$$\text{Subtract -: }\;2a\:=\:4 \quad\Rightarrow\quad a \:=\:2$$

$$\text{Substitute into : }\;6 + b \:=\:9 \quad\Rightarrow\quad b \:=\:3$$

$$\text{Substitute into : }\;2 + 3 + c \:=\:4 \quad\Rightarrow\quad c \:=\:-1$$

$$\text{Therefore, the }n^{th}\text{ term is: }\:f(n) \:=\:2n^2 + 3n - 1$$

#### artemishunts200

##### New member
Thank you so much, guys! I knew I was on the right track, but I just couldn't get all of it! You are AWESOME!!! Renee

#### Sudharaka

##### Well-known member
MHB Math Helper
Thank you so much, guys! I knew I was on the right track, but I just couldn't get all of it! You are AWESOME!!! Renee

Glad to hear that our answers helped you. 