sum (n-i-1) choose (r-1) for i from 0 to k