factors and triangular numbers