Function to find the number of permutations of n different things taken r at a time with k things grouped together
int countPermutations ( int n , int r , int k ) { return factorial ( k ) * ( r - k + 1 ) * npr ( n - k , r - k ) ; }