Anand CV Mallaya

Benford’s law applied to Prime numbers

In math on May 27, 2012 at 6:22 pm

Benford’s law is one of the many amazing laws regarding numbers. Benford’s law, also called the first-digit law, states that in lists of numbers from many (but not all) real-life sources of data, the leading digit is distributed in a specific, non-uniform way. It says that in many large data sets, the digit ‘1’  appears as first digit for a significant 30.1% times, ‘2’ for 17.6%, 3 for 12.5%, 4 for 9.5%, 5 for 7.9%, 6 for 6.7%, 7 for 5.8%, 8 for 5.1% and digit 9 for 4.6%. Below is the Benford’s distribution(Image courtesy Wikipedia).

A sequence of decreasing blue bars against a light gray grid background.

It is obvious that the percentage reduces in a power law as the digit grows bigger(power law).

This is observed in many natural accounting data, election data, genomic data etc.

Here is an attempt to look at my favorite list of numbers using this law. Both for fun as well as for exploratory purpose.

I have done the following in a math tool to generate prime numbers less than 1000000 and then counted the first digit of each prime number and plotted in a bar chart. The plot is given below.

Plot of First digit distribution of Prime Numbers
Clearly, though there are somewhat appearance of a power law distribution, it is nowhere near Benford’s distribution.There goes my search for patterns in prime numbers to the next stage.
  1. An information to you:

    In a recent study, Bartolo Luque and Lucas Lacasa of the Universidad Politécnica de Madrid in Spain have discovered a new pattern in primes that has surprisingly gone unnoticed until now. They found that the distribution of the leading digit in the prime number sequence can be described by a generalization of Benford’s law. –>

    bye …

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: