# Math Help - counting number

1. ## counting number

i have the question
The counting numbers are written in the pattern at the righ. Find the midle number of the 40th row.

1
2 3 4
5 6 7 8 9
10 11 12 13 14 15 16 [/LEFT]

2. solution is 1561.
simple method is to make general term of the middle element of each row using A.P then finding the 40th element
general term will be n(n-1)+1
n=1 gives 1
n=2 gives 3
n=3 gives 7
these all are middle term of each row so on putting 40 middle number of 40th row will be obtained

3. Hello, rai2003!

$\text{The counting numbers are written in this pattern:}$

. . . . . . $\begin{array}{ccccccc}
&&&1 \\ && 2 & 3 & 4 \\ & 5 & 6 & 7 & 8 & 9 \\
10 & 11 & 12 & 13 & 14 & 15& 16 \\
& & & \vdots\end{array}$

$\text{Find the middle number of the }40^{th}\text{ row.}$

The middle numbers form this sequence: . $1,\:3,\:7,\:13,\:21,\:\hdots$

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

. . $\begin{array}{cccccccccccccc}
\text{Sequence} & 1 && 3 && 7 && 13 && 21 && \hdots \\
\text{1st difference} && 2 && 4 && 6 && 8 && \hdots\\
\text{2nd difference} &&& 2 && 2 && 2 && \hdots \end{array}$

Since the second differences are constant,
. . the generating function is of the second degree . . . a quadratic.

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

We know the first term terms of the sequence.

. . $\begin{array}{cccccccccc}
f(1) = 1: & a + b + c &=& 1 & [1] \\
f(2) = 3: & 4a + 2b + c &=& 3 & [2] \\
f(3) = 7: & 9a + 3b + c &=& 7 & [3] \end{array}$

$\begin{array}{cccccccc}
\text{Subtract [2] - [1]:} & 3a + b &=& 2 & [4] \\
\text{Subtract [3] - [2]:} & 5a + b &=& 4 & [5] \end{array}$

$\begin{array}{ccccccc}
\text{Subtract [5] - [4]:} & 2a \:=\: 2 & \Rightarrow & a \:=\:1 \end{array}$

Substitute into [4]: . $3(1) + b \:=\:2 \quad\Rightarrow\quad b \:=\:\text{-}1$

Substitute into [1]: . $1 + (\text{-}1) + c \:=\:1 \quad\Rightarrow\quad c \:=\:1$

Hence, the generatng function is: . $f(n) \;=\;n^2-n+1$

Therefore: . $f(40) \;=\;40^2 - 40 + 1 \;=\;\boxed{1561}$

4. thanks