Zseq (version 0.2.0)

Triangular: Triangular numbers

Description

Under OEIS A000217, a Triangular number counts objects arranged in an equilateral triangle. First 6 Triangular numbers are 0, 1, 3, 6, 10, 15.

Usage

Triangular(n, gmp = TRUE)

Value

a vector of length n containing first entries from the sequence.

Arguments

n

the number of first n entries from the sequence.

gmp

a logical; TRUE to use large number representation, FALSE otherwise.

Examples

Run this code
## generate first 20 Triangular numbers
print(Triangular(20))

Run the code above in your browser using DataLab