Python model - Zipf's law

Job ID: 33438550

Budget: £10 – £20 GBP

I wonder whether you can help me with something? I'm looking to apply Zipf's law as a way to give a rough estimate for a market size...
If you know the top-ranked example in a list, then you can estimate that the nth-ranked example will be size of example 1 / n.
I think if you add up all the estimates, you have estimated the total size of the list.
While I think anyone could do this with a spreadsheet or iterating in python, I expect that there's a way to estimate the total in an elegant formula
I'm not enough of a mathematician to know what that might be. Do you happen to know?
Related categories: Python Statistics Mathematics