e.g. If 4 is given: 1 + 3 + 6 + 10 = 20. Triangular Numbers cannot be negative so return 0 if a negative number is given.
https://doi.org/10.4169/college.math.j.46.3.172 https://www.jstor.org/stable/10.4169/college.math.j.46.3.172 The College Mathematics Journal emphasizes the first two ...
our task is to return the sum of Triangular Numbers up-to-and-including the nth Triangular Number. Triangular Number: "any of the series of numbers (1, 3, 6, 10, 15 ...