Position of 20096 in triangular array of all natural numbers

554 Views Asked by At

Write the set of all natural numbers in a triangular array as

Infinite Triangular Array

Find the row number and column number where $20096$ occurs. For example, $8$ occurs on row: $3$, column: $2$

Now, the upper row is obviously of the form $\large f(n) = \frac{n(n+1)}{2}$. Running a computer program I get that at $n=200$, $f(n)$ has the value $20100$.

I used the program to determine the value closest to $20096$. So now I know $20100$ occurs at row:$1$, column: $200$, thus $20096$ can be reached by going bottom-left for five steps? Am I counting right? Should it be row:$5$ , column:$195$?

Also can anyone figure out a less "hacky" way to solve this? Because this solution was completely dependent on finding $f(200) = 20100$ which was completely trial and error, albeit made easier by the fact that I didn't have to do it by hand. Also why exactly are the numbers in the top row of the form of the sum of the first $n$ natural numbers, I can't see a clear connection?

1

There are 1 best solutions below

3
On BEST ANSWER

Let x be the number of the column and y be the number of the row where your number exists. Let z be your number.

As you noticed, you have to find the number n where $f(n-1)\lt z\le f(n)$. Then, n+1 will be the number of the diagonal: $x+y=n+1$.

Then you will have to find out your row: $x=f(n)-z+1$

So for your example: $19900=f(199)\lt 20096\le f(200)=20100$

and $x=f(200)-20096+1=5$.

So $y=n-x+1$. $y=200-5+1=196$

The position is $(x,y)=(5,196)$