Given a number N, I am trying to find the largest triangle number that is smaller or equal to N. A triangle is the sum of the first n
N
n