# Floyd's Triangle

The numbers are arranged in a interesting way:

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

As you can see, every row has one extra number then the previous row. Using the illustration above to guide you, work out how many numbers lower than 2009 are there in the column containing 2009.

How can we figure out the answer? Is there a repeating pattern of the last number in each row? Can a connection between the number of rows, the last number of the rows, and the numbers in a row be established?

• Seems like triangular numbers may be useful here! – Matt Dec 24 '16 at 17:53
• The last entry in the $n$-th row is $\frac{n(n+1)}{2}$ – Dave Dec 24 '16 at 17:55

Notice that each row ends with $1+2+3+4+\dots+n$, a triangle number, since that's how many numbers are in each row above it:

\begin{align}1&=\frac{1\times2}2\\3&=\frac{2\times3}2\\6&=\frac{3\times4}2\end{align}

etc.

And since $$1953=\frac{62\times63}2<2009<\frac{63\times64}2=2016$$

then it happens to be the case that $2009$ lies on the $63$rd row. One can deduce this since

$$2009=\frac{n(n+1)}2\implies4018=n(n+1)\approx n^2\implies n\approx\sqrt{4018}\\\implies 62\le n\le 63$$

And then it should be clear that $2009$ is the $56$th number of the $63$rd row, so there are $7$ numbers above it since $63-56$ gives the numbers until you hit the $56$th rows, which beyond that will not have any numbers in the same column.

• Thanks a bunch for the answer! A big, fat thanks. :-) – Soha Farhin Pine Dec 24 '16 at 18:05
• @SohaFarhinPine no problem, hope its pretty clear. – Simply Beautiful Art Dec 24 '16 at 18:05
• @SohaFarhinPine The formula was last # in $n$th row = $n\times(n+1)/2$ – Simply Beautiful Art Dec 24 '16 at 18:10
• Did you get 62 and 63 by trial and error? – Soha Farhin Pine Dec 24 '16 at 18:10
• @SohaFarhinPine No. Notice that$$2009=\frac{n(n+1)}2\implies4018=n(n+1)\approx n^2\implies n\approx\sqrt{4018}$$ – Simply Beautiful Art Dec 24 '16 at 18:12

By the way this triangular shape is constructed, the total number of numbers listed in the first $n$ rows is the sum of the first $n$ integers: $$1+2+\cdots+n=\frac{n(n+1)}{2}$$ according to the formula for the sum of an arithmetic progression (sequence). These are also known as triangular numbers. So you can determine in which row $2009$ is if you solve the inequality $\frac{n(n+1)}{2}<2009$ for the largest positive integer $n$ that satisfies it. Then subtracting $\frac{n(n+1)}{2}$ from $2009$ will tell you in which column $2009$ is.

• Here $n$ is $2009$. – Soha Farhin Pine Dec 24 '16 at 17:57
• No, here $n$ is the last row before the row where $2009$ will appear (so that $2009$ will be in the $(n+1)$-st row). – zipirovich Dec 24 '16 at 17:58
• Ahh...thanks. I see it now. – Soha Farhin Pine Dec 24 '16 at 17:58
• Could you answer my other question: math.stackexchange.com/questions/2070615/… – Soha Farhin Pine Dec 24 '16 at 18:00