I don't understand the question statement. Are you saying that given some frequency distribution S(f) the following holds?

This just says that

So the slope of S(f) immediately reveals the value of K.

If you've got discrete bins just do a linear regression on their values to get an estimate of the slope of