ECS #340: k-gonal numbers