pub fn trinum(x: usize) -> usize
Calculates a triangular number, where trinum(x) == x*(x+1)/2.
trinum(x) == x*(x+1)/2