mukp function

to use when p,k different from range [4,6]