How it’s calculated
Figurate numbers count dots arranged in a regular shape. Triangular numbers make triangles (1, 3, 6, 10, …), square numbers make squares (1, 4, 9, 16, …), and pentagonal and hexagonal numbers grow nested pentagons and hexagons. Cube numbers count the small cubes in a bigger cube.
| Type | nth number | First five |
|---|---|---|
| Triangular | n(n + 1) ÷ 2 | 1, 3, 6, 10, 15 |
| Square | n² | 1, 4, 9, 16, 25 |
| Pentagonal | n(3n − 1) ÷ 2 | 1, 5, 12, 22, 35 |
| Hexagonal | n(2n − 1) | 1, 6, 15, 28, 45 |
| Cube | n³ | 1, 8, 27, 64, 125 |
Example: the 10th triangular number is 10 × 11 ÷ 2 = 55, the sum 1 + 2 + … + 10. To test a number, the calculator solves each formula for n and checks that n comes out whole: 36 is triangular (8 × 36 + 1 = 289 = 17², so n = (17 − 1) ÷ 2 = 8) and also square (6²).
Frequently asked questions
What is a triangular number?
A number of dots that can be arranged in a triangle: 1, 3, 6, 10, 15, … The nth one is 1 + 2 + … + n = n(n + 1) ÷ 2.
Is every hexagonal number triangular?
Yes. The nth hexagonal number n(2n − 1) is the (2n − 1)th triangular number, so 6, 15, 28 and 45 are all triangular.
Which numbers are both triangular and square?
1, 36, 1,225, 41,616 and so on. They are rare: each is roughly 34 times the one before.
How do I know if a number is a perfect square?
Its square root is a whole number. The tester here checks that exactly, so 1,000,000 is square (1,000²) but 999,999 is not.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- OEIS A000217: Triangular numbers, a(n) = n(n + 1)/2 — OEIS Foundation
- OEIS A000326: Pentagonal numbers, a(n) = n(3n − 1)/2 — OEIS Foundation
- OEIS A000384: Hexagonal numbers, a(n) = n(2n − 1) — OEIS Foundation
- Triangles Within Pentagons (pentagonal numbers built from triangular numbers) — NRICH, University of Cambridge
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator