Rdocumentation
powered by
Learn R Programming
miscset (version 1.0.0)
ntri: Return Triangular Numbers
Description
Return the series of triangular (/triangle) numbers up to a number of
n
rows of a triangle. The series has the entry number "A000217" at
https://oeis.org/A000217
and starts like this: 0, 1, 3, 6, 10, ...
Usage
ntri(n)
Arguments
n
Positive integer value for sequence length.
Value
Returns an integer vector of length
n
.