Nth triangle number for a given k length factor search