Triangular Number

A triangular number counts the number of objects that can form an equilateral triangle. The n-th triangular number is defined as (= (tri n) (div (* n (+ n (1))) (2))) /edit/peano/peano_thms.gh/df-tri

The triangular numbers can be computed with the sum (= (sum (0) A (lambda x x)) (tri A)) /edit/peano/peano_thms.gh/arithmeticsumtri and thus it forms the additive analogy to the factorials. Triangular numbers can also be expressed using the recurrence relation (= (tri (+ A (1))) (+ (+ (tri A) A) (1))) /edit/peano/peano_thms.gh/trianglePlus1r. Triangular numbers are monotonically increasing.

Examples

The first (10) triangular numbers are:

(0) /edit/peano/peano_thms.gh/triangle0, (1) /edit/peano/arithmetic.gh/triangle1, (3) /edit/peano/arithmetic.gh/triangle2, (5) /edit/peano/arithmetic.gh/triangle3, (10) /edit/peano/arithmetic.gh/triangle4, (+ (10) (5)) /edit/peano/arithmetic.gh/triangle5, (+ (* (2) (10)) (1)) /edit/peano/arithmetic.gh/triangle6, (+ (* (2) (10)) (8)) /edit/peano/arithmetic.gh/triangle7, (+ (* (3) (10)) (6)) /edit/peano/arithmetic.gh/triangle8, (+ (* (4) (10)) (5)) /edit/peano/arithmetic.gh/triangle9, (+ (* (5) (10)) (5)) /edit/peano/arithmetic.gh/triangle10

Arithmetic Overview

Login to edit