Benford's Law and the OEIS

Alonso Del Arte alonso.delarte at gmail.com
Wed Aug 24 23:51:16 CEST 2005


I'm wondering if anyone has studied Benford's Law in connection with the OEIS?

Looking at just the A numbers of recently added sequences, 1 should
have a healthy lead for the next decade.

I looked at a few core sequences and some results were interesting and
unexpected, others were not. Given the prime numbers up to 10000, the
digits 1 - 9 and 0 occur

{681, 391, 677, 360, 360, 369, 652, 351, 646, 232}

As expected, the digits 1, 3, 7 and 9 occur more often. Which is a
similar distribution to what we get if we just look at the first 47
primes:

{38, 5, 17, 4, 5, 4, 17, 3, 15, 4}

Looking at the first 47 Fibonacci numbers, I got

{42, 24, 31, 25, 22, 18, 24, 21, 20, 17}

Pi gives a fairly even distribution of all digits. Looking at the
first thousand digits,

{116, 103, 103, 93, 97, 94, 95, 100, 106, 93}

gives results different than what Benford's Law would predict.

Turning my attention to relatively recent sequences, I looked at the
highly cototient numbers (A100827), and as expected

{18, 15, 14, 14, 12, 15, 8, 11, 44, 8}

9s occur most often (though I still don't have an explanation for
this, only a hunch it has something to do with the Goldbach
conjecture).

Alonso

P.S. This is the Mathematica program I used:

piStop = 1229; freqString = Table[0, {10}]; Do[intString = IntegerDigits[
    Prime[n]]; Do[If[Not[
  intString[[m]] == 0], 
    freqString[[intString[[m]]]]++, freqString[[10]]++], {m, 
    Length[intString]}], {n, piStop}]; freqString






More information about the SeqFan mailing list