Function rstats::sumn

source ·
pub fn sumn(n: usize) -> usize
Expand description

Sum of natural numbers 1..n. Also the size of an upper or lower triangle of a square array (including the diagonal) to exclude the diagonal, use sumn(n-1)