adding triangular sequence generator and appropriate test
solving problem 12 once and for all....