# Difference between revisions of "Triangular number"

(Did some stuff, added some stuff, organized some stuff) |
Sakshamsethi (talk | contribs) (→Definition) |
||

(3 intermediate revisions by 2 users not shown) | |||

Line 2: | Line 2: | ||

==Definition== | ==Definition== | ||

− | The <math>n^{th}</math> triangular number is the sum of all natural numbers from one to n. | + | The <math>n^{th}</math> triangular number is the sum of all natural numbers from one to <math>n</math>. |

That is, the <math>n^{th}</math> triangle number is | That is, the <math>n^{th}</math> triangle number is | ||

<math>1 +2+3 + 4............. +(n-1)+(n)</math>. | <math>1 +2+3 + 4............. +(n-1)+(n)</math>. | ||

Line 8: | Line 8: | ||

For example, the first few triangular numbers can be calculated by adding | For example, the first few triangular numbers can be calculated by adding | ||

1, 1+2, 1+2+3, ... etc. | 1, 1+2, 1+2+3, ... etc. | ||

− | + | <math>} | |

− | <math> | ||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

rowStart -= 0.5; | rowStart -= 0.5; | ||

} | } | ||

Line 35: | Line 20: | ||

label( (string) value, (value+5, -2)); | label( (string) value, (value+5, -2)); | ||

} | } | ||

− | </asy> | + | </asy></math> |

+ | |||

==Formula== | ==Formula== | ||

## Latest revision as of 18:46, 15 July 2020

The **triangular numbers** are the numbers which are the sum of the first natural numbers from to .

## Definition

The triangular number is the sum of all natural numbers from one to . That is, the triangle number is .

For example, the first few triangular numbers can be calculated by adding 1, 1+2, 1+2+3, ... etc.

```
$}
rowStart -= 0.5;
}
return 0;
```

}

for (int n=1; n<5; ++n) {

real value= n*(n+1)/2; draw_triangle((value+5,n),n); label( (string) value, (value+5, -2));

} </asy>$ (Error compiling LaTeX. ! Extra }, or forgotten $.)

## Formula

Using the sum of an arithmetic series formula, a formula can be calculated for :

The formula for finding the triangular number can be written as .

It can also be expressed as the sum of the row in Pascal's Triangle and all the rows above it. Keep in mind that the triangle starts at Row 0.

*This article is a stub. Help us out by expanding it.*