This function computes the probability p(k) of obtaining k from a logarithmic distribution with probability parameter p, using the formula given above.