Benford's law with random integers I tried testing random integers for compliance with Benford's law, which they are apparently supposed to do. However, when I try doing this with Python,

map(lambda x:str(x)[0], [random.randint(0, 10000) for a in range(100000)]).count('1')

I get approximately equal frequencies for all leading digits. Why is this the case? Might it have something to do with how the pseudorandom number generator, the Mersenne twister, works?

The simplest solution to approach the logarithmical distribution using mersenne twister is by using two dimensions of randomness. First the bandwidth for the amount of digits, say 15, secondly the bandwidth, say 10-100000. With more than 10,000 iterations the results shows an almost exact benford distribution.
Hope this helps.
Regards, 
Dennes Spek 
