Sorta working, problem with getting triangle numbers