Slashdot Mirror


New Pattern Found In Prime Numbers

stephen.schaubach writes "Spanish Mathematicians have discovered a new pattern in primes that surprisingly has 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. ... Besides providing insight into the nature of primes, the finding could also have applications in areas such as fraud detection and stock market analysis. ... Benford's law (BL), named after physicist Frank Benford in 1938, describes the distribution of the leading digits of the numbers in a wide variety of data sets and mathematical sequences. Somewhat unexpectedly, the leading digits aren't randomly or uniformly distributed, but instead their distribution is logarithmic. That is, 1 as a first digit appears about 30% of the time, and the following digits appear with lower and lower frequency, with 9 appearing the least often.'"

102 of 509 comments (clear)

  1. Other bases? by wiredlogic · · Score: 4, Insightful

    When happens with the primes are represented in base-9 or base-11?

    --
    I am becoming gerund, destroyer of verbs.
    1. Re:Other bases? by Anonymous Coward · · Score: 5, Funny

      It would be bad.

    2. Re:Other bases? by hkz · · Score: 5, Informative

      Benson's Law is actually independent of the number base used. It wouldn't be much of a mathematical property if it wasn't. No matter how you convert a number, you will always see the same bias.

    3. Re:Other bases? by Anonymous Coward · · Score: 5, Funny

      Bad as in "cross the streams" bad, or "according to an AC on Slashdot" bad ?

    4. Re:Other bases? by jonaskoelker · · Score: 4, Insightful

      I don't know; it might be interesting to know that the leading digits of powers-of-k are distributed in some interesting way in base not-k. They obviously all have a leading 1 in base k.

    5. Re:Other bases? by Megaweapon · · Score: 5, Funny

      base-9 or base-11?

      NEVER FORGET

      --
      I'm sure "SlashdotMedia" will improve on all the wonders that Dice Holdings blessed us all with
    6. Re:Other bases? by pdxp · · Score: 5, Informative

      It wouldn't change the logarithmic nature of the distribution of the digits, AFAIK.

      My math degree is getting dusty, but I'm pretty sure that the same pattern could be represented in another base by changing their generalization of Benford's law to include it, and the distribution would look like log(x)/log(9) or log(x)/log(11). Remember, changing the base of a logarithm is easy: for example, log(x)/log(e) = ln(x)

      So you get the same distribution, different base.

    7. Re:Other bases? by Anonymous Coward · · Score: 4, Interesting

      Benson's Law is actually independent of the number base used. It wouldn't be much of a mathematical property if it wasn't.

      Err, what? The study of representations of numbers is a valid field of mathematics itself.

    8. Re:Other bases? by Kjella · · Score: 2, Interesting

      If you got more numbers in 10-19 than 90-99, you probably also have more numbers in 0x10-0x1f than 0xf0-0xff...

      --
      Live today, because you never know what tomorrow brings
    9. Re:Other bases? by Anonymous Coward · · Score: 2, Interesting

      (Warning, IANAM)
      It's base independent. Basically, primes are distributed on a logarithmic scale (prime number theorem). For sufficently large intervals, there are always more primes in interval starting at x than the interval of the same size starting at y if xy. Like, there are more prime numbers in 1000..1999 than in 9000..9999.

    10. Re:Other bases? by dave1g · · Score: 4, Informative

      from benfords law link:

      "The result holds regardless of the base in which the numbers are expressed, although the exact proportions change."

    11. Re:Other bases? by AvitarX · · Score: 3, Funny

      I just did it in base-2 and found that 100% of all primes start with the digit 1.

      --
      Wow, sent an e-mail as suggested when clicking on "use classic" banner, and got a fast response that addressed my msg
    12. Re:Other bases? by CaseyB · · Score: 5, Funny

      All your base are belong to Benford.

    13. Re:Other bases? by Lillesvin · · Score: 5, Funny

      I'm pretty sure that in base-2 with no zero-padding, 100% will start with 1. :-p

      --
      "Live free or don't."
    14. Re:Other bases? by stonewallred · · Score: 4, Interesting

      Code this have cryptographical uses? IANAMOG, but I know primes play a role in many crypto schemes.

    15. Re:Other bases? by dynamo52 · · Score: 5, Insightful

      I'm pretty sure that in base-2 with no zero-padding, 100% will start with 1.

      ...and all but one would end with 1 as well.

      --
      Like this comment? I accept Bitcoin! - 153sc8UUBXyp12ofQqfAWDmJrzyiKCYC1x
    16. Re:Other bases? by Yold · · Score: 2, Interesting

      The Wikipedia article states that in practice more than the first digit is used.

      Is this something like a histogram, and increasing the number of digits analyzed gives you a better picture?

    17. Re:Other bases? by Anonymous Coward · · Score: 4, Interesting

      But how many would contain all 1s? Answer that, and provide a proof for your answer, and you'll make math history.

    18. Re:Other bases? by Anonymous Coward · · Score: 5, Informative

      Numbers are objects, I wish people would understand that numbers are just distinctions. The whole of mathematics is really just a language of form and structure, a system to systematize and decribe structure and forms (relationships are a type of form).

    19. Re:Other bases? by Sparr0 · · Score: 3, Interesting

      The ending of a number in binary indicates its oddness. 2 (0b10) is the only prime that ends in zero in binary.

    20. Re:Other bases? by Sparr0 · · Score: 4, Insightful

      The faux concern, or misplaced real concern, so many people show over 9/11 has made it a relevant target for such jokes since 9/12.

    21. Re:Other bases? by Ibag · · Score: 5, Informative

      Benford's law works by the observation that, when numbers come up in certain real world contexts, the fluctuations you get in numbers should be proportional to the numbers themselves. Phrased differently, variations tend to be relative, not absolute. Because of this, if you have a very large range of random numbers from many real world measurements, then you would expect the number between t and t*(1.0001) not to vary too much for small changes in t. Let us try to use this observation very coarsely. Among the numbers with 6 digits, the number that look like 1xxxxxx (those between 100000 and 200000) should be about the same the number between 200000 and 400000. The same thing happens with the numbers with 5 digits or 7 digits or n digits (assuming that you have a wide range of random numbers, and the numbers are the kind that come from certain sorts of real world measurements). Additionally, you can get distributions for the first two digits, the first three digits, etc.

      This observation doesn't depend on the base that you're working with.

      Now, with the prime numbers, they have a distribution that is different from a lot of real world measurement data. The number of primes between n and n+d is approximately d/ln(n), where ln is the log with base e and d is small compared to n. So the number of primes between 500000 and 600000 is about 100000/ln(500000), and the number of primes between 500000 and 600000 is about 100000/ln(600000). By using this, and being slightly more careful, one can determine fairly easily the distribution of the leading terms of the prime numbers.

      This is not a hard result. I would say that any professional mathematician who knew about the basic distribution of the primes could derive the distribution of the leading digis of the prime numbers fairly easily if anybody actually asked them to. The reason nobody mentioned this before is that nobody actually cares. While Benford's law does have applications to fraud detection, this new result does not. It's one of those things that makes people say "ooh, a pattern!" but which is just an easy and somewhat mundane corollary to a well known theorem.

    22. Re:Other bases? by Anonymous Coward · · Score: 2, Insightful

      It was long enough by about a week later. This is the internet, on the internet anything more than a month old is ancient history.

    23. Re:Other bases? by Anonymous Coward · · Score: 5, Funny

      Knock knock.

      Who's there?

      9/11.

      9/11 who?

      YOU SAID YOU'D NEVER FORGET!

    24. Re:Other bases? by Anonymous Coward · · Score: 5, Funny

      Oh yeah? Well give me two minutes and check again.

    25. Re:Other bases? by Jane+Q.+Public · · Score: 4, Funny

      Some encryption algorithms that were predicted to take forever to crack with today's technology, may in the long run end up taking the logarithm of forever.

    26. Re:Other bases? by Anonymous Coward · · Score: 5, Informative

      They are also distributed as Benson's law describes, providing that k is not a rational power of the base. IAAM.

    27. Re:Other bases? by nine-times · · Score: 2, Informative

      Right, but the law is regarding distribution among the digits of possible first digits. Given that 1 is the only possible first digit in base 2, it could still be said to hold.

      I don't actually know, I'm guessing here. But it seems like in base-8, you wouldn't be looking to include the digit 9 in your distribution analysis.

    28. Re:Other bases? by tuck182 · · Score: 5, Informative

      You mean, how many are Mercene primes?

    29. Re:Other bases? by kasperd · · Score: 2, Interesting

      But how many would contain all 1s? Answer that, and provide a proof for your answer, and you'll make math history.

      Obviously the number of digits would have to be a prime number. But not all prime number of digits would give you a prime number. The first case is when there are 11 digits, the number would be 23*89 in that case.

      --

      Do you care about the security of your wireless mouse?
    30. Re:Other bases? by Bromskloss · · Score: 5, Funny

      I'm pretty sure that in base-2 with no zero-padding, 100% will start with 1. :-p

      100% = 100/100 = 1 = 0b1, which, by the way, looks like "Obi" and sounds like "Obi-Wan" when you say it.

      --
      Swedish plasma phys. PhD student; MSc EE; knows maths, programming, electronics; finance interest; seeks opportunities
    31. Re:Other bases? by jd · · Score: 5, Funny

      "Bad" as in you will see the Message as hinted at by Carl Sagan's "Contact". It's from God and apparently decodes to: "We apologize for the inconvenience".

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    32. Re:Other bases? by jd · · Score: 2, Interesting

      Since RSA relies on it being a Hard Problem to factor a number that is the product of two very large primes, it potentially introduces a weakness, as it presumably means some of those products will be easier to factor than others. A number that can be shown to be the product of two primes that both start with 9 should be much easier to work on than a number where both primes start with a 1, as there are far fewer 9- primes and therefore a smaller search space.

      The obvious place to start looking would be the RSA's prime challenge. If I'm even vaguely close to being right, then you should start seeing crypto mailing lists looking for vulnerable targets amongst the numbers the RSA has published.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    33. Re:Other bases? by Zeroko · · Score: 3, Interesting

      Since "forever" is often exponential time, the logarithm of forever would indeed make cryptanalysis easy. :)

    34. Re:Other bases? by PleaseFearMe · · Score: 5, Funny

      It would be bad with binary. All numbers start with 1's.

    35. Re:Other bases? by Simetrical · · Score: 4, Informative

      But how many would contain all 1s? Answer that, and provide a proof for your answer, and you'll make math history.

      For those who didn't get it: it's not known whether there are infinitely many Mersenne primes, which have this form in binary (they're primes of the form 2^n - 1). Similarly, if you could figure out how many primes have only their first and last bits equal to 1, you would answer a longstanding question about Fermat primes (which are primes of the form 2^n + 1).

      --
      MediaWiki developer, Total War Center sysadmin
    36. Re:Other bases? by Anonymous Coward · · Score: 5, Funny

      I will never understand how people do that. You have the link right there. Even if you didn't open it to make sure, the link itself mentions the name "Mersenne Prime", and yet you write Mercene.

    37. Re:Other bases? by spartacus_prime · · Score: 5, Funny

      You have no chance to survive make your prime.

      --
      If you can read this, it means that I bothered to log in.
    38. Re:Other bases? by Anonymous Coward · · Score: 4, Funny

      AND end with 1...this must be a conspiracy

    39. Re:Other bases? by wealthychef · · Score: 4, Funny

      That starts with an "N", which is not a number.

      --
      Currently hooked on AMP
    40. Re:Other bases? by John+Hasler · · Score: 2, Informative

      And sure enough, the formula says that the probability of 1 being the first digit of a binary number is 1.

      --
      Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
    41. Re:Other bases? by s-orbital · · Score: 4, Funny

      A friend of mine went to Hawaii last week, and I asked her if she'd ever been to Pearl* Harbor, and she said she'd only seen it from the air.
      I replied, hey, just like the Japanese!

      *That was hard not to type "Perl". I failed at first

      --
      Patent: from Latin patere, to be open
    42. Re:Other bases? by nog_lorp · · Score: 2, Insightful

      That is how it seems now isn't it?

      However, it has never been proven.

    43. Re:Other bases? by Thing+1 · · Score: 5, Funny

      IAAM.

      Wow, first use of "I am a moron" I've seen in the field!

      Hmm, or it is Mormon?

      --
      I feel fantastic, and I'm still alive.
    44. Re:Other bases? by Blakey+Rat · · Score: 4, Interesting

      The whole of mathematics is really just a language of form and structure, a system to systematize and decribe structure and forms (relationships are a type of form).

      So... mathematics is the vaguest thing possible?

    45. Re:Other bases? by DavidShor · · Score: 2, Insightful

      You should see Category Theory, "Well, a morphism is when you've got some things, and then you end up with some stuff...."

    46. Re:Other bases? by jonnat · · Score: 2, Insightful

      AND end with 1...this must be a conspiracy

      Except for 10, of course.

    47. Re:Other bases? by Mattcelt · · Score: 2, Funny

      ...unless they're imaginary...

  2. Duh by Anonymous Coward · · Score: 3, Insightful

    Benford's "law" is not a law at all... any exponential distribution will exhibit this behavior.

    1. Re:Duh by Anonymous Coward · · Score: 2, Funny

      You're right! I'm writing to my congress asking them to repeal Benford's Law.

    2. Re:Duh by jstott · · Score: 2, Insightful

      Benford's "law" is not a law at all... any exponential distribution will exhibit this behavior.

      A law, as the word is commonly used in math and physics, is a mathematical expression of a universal relationship. As you say, Benson's law is a property of any exponential distribution, so we agree it's universal. Why then can't we call it a law? Just because it's obvious after you understand it doesn't make it any less a law.

      -JS

      --
      Vanity of vanities, all is vanity...
  3. Re:9999991 by Aranykai · · Score: 4, Insightful

    Explain one man being hit seven times with lightning. http://en.wikipedia.org/wiki/Roy_Sullivan
    Improbable doesn't mean impossible.

    --
    If sharing a song makes you a pirate, what do I have to share to be a ninja?
  4. Like batting orders by sam_handelman · · Score: 3, Interesting

    I'm not a mathematician, could someone explain why this is surprising in terms that a computer programmer or biologist could follow? First thing I thought - no matter how many innings you have, you can guarantee that the top of the order will be up at least as many times as the bottom of the order.

      Okay, if you have a random number along the interval (1,10^X), all the leading digits will be equally likely.

      If you have some other interval (1,n*10^X), 1<=n<=9, then the leading digits > n will appear roughly 1/10 as often as leading digits 1..n.

      If you have a large sample which is drawn from an admixture of some huge number of random distributions (1,n*10^X), with the "n" of each sub-distribution evenly distributed on 1..9, then the lower leading digits will be moderately more common, yeah?

      Prime numbers, meanwhile, become decreasingly common as you get larger and larger, is that not correct? So it seems to me this is the obvious way to model prime numbers, no?

    --
    The good and new comes from no quarter where it is looked for, and is always something different from what is expected.
    1. Re:Like batting orders by ReallyNiceGuy · · Score: 2, Interesting
  5. Stock market analysis? by MSTCrow5429 · · Score: 4, Interesting

    I am admittedly not a mathematician, but I do have a good understanding of economics and finance, and I am not seeing how a pattern found in prime numbers could have any application to stock market analysis. Where is the interaction between prime numbers and the praxeology of buying and selling securities? Even if you're only focusing on automated buying and selling, those algorithms were still programmed by humans with their own subjective approaches and underlying premises.

    --
    Slashdot: Playing Favorites Since 1997
    1. Re:Stock market analysis? by maxume · · Score: 2, Informative

      Benford's law can be used to detect fraud (the article states this, I don't have any reason to doubt it). They studied primes and found a pattern that is associated with a related property that they are calling Generalized Benford's Law. Presumably, the generalized rule can be used to detect a wider range of unnatural activity than Benford's law itself.

      --
      Nerd rage is the funniest rage.
    2. Re:Stock market analysis? by Rayban · · Score: 4, Funny

      I've always wondering how I could figure out when someone was trying to pass off a list of fraudulent primes. Glad to see that this problem is finally solved!

      --
      æeee!
    3. Re:Stock market analysis? by rackserverdeals · · Score: 4, Funny

      I am admittedly not a mathematician, but I do have a good understanding of economics and finance, and I am not seeing how a pattern found in prime numbers could have any application to stock market analysis. Where is the interaction between prime numbers and the praxeology of buying and selling securities?

      By understanding the patterns in prime numbers you can learn to spot them and avoid the sub-prime mortgage backed securities. Duh.

      --
      Dual Opteron < $600
    4. Re:Stock market analysis? by arth1 · · Score: 4, Interesting

      I've always wondering how I could figure out when someone was trying to pass off a list of fraudulent primes. Glad to see that this problem is finally solved!

      You're jesting, but I imagine that many fields of encryption would benefit from this, like dual key encryption, where the security lies in the ability to trust that the product really is of two primes, and that factoring this would be extremely time consuming.

      Sets with a backdoor inserted may indeed have a different signature, and to be able to quickly see that one set differs would be invaluable. It wouldn't prove anything, but if, say, keys received from a certain company's key generator stood out like a sore thumb in a Benford distribution check, you would have reason to suspect foul play, incompetence or both.

    5. Re:Stock market analysis? by maxume · · Score: 2, Interesting

      "I have poor reading comprehension" isn't that great of a joke.

      If you really didn't figure it out yet (I suspect you actually have), the ability to detect a pattern that should occur in natural data but probably will not be present in fraudulent data (a sophisticated fraudster can generate to any test...) is what makes it interesting for detecting fraud, not the fact that the pattern was first elucidated from prime numbers.

      --
      Nerd rage is the funniest rage.
  6. The real article, and what it does and doesn't say by jonaskoelker · · Score: 2, Informative

    You can find the mathematicians' article at http://www.citeulike.org/group/3214/article/3664693 or http://arxiv.org/pdf/0811.3302 (pdf warning).

    I find it interesting that the article doesn't prove any theorems. At least searching for the word "theorem" in the pdf only gives references to other theorems. Searching for "proof" gives no hits.

    That leaves me thinking: what does this article tell us that we couldn't find out ourselves by ripping through some prime numbers? I thought the real power of math was to say something 100% certain about some infinitude of stuff, so we don't have to go and check every case by hand.

    Oh well, I guess every open question needs some results on the form "this holds for all n <= bignum"; say, like the Goldbach Conjecture (every even number n > 2 is the sum of two primes).

  7. Re:Why do people study "math" in college? by Anonymous Coward · · Score: 4, Funny

    The real question is did his feigned interest result in sexual intercourse?

  8. Cryptography? by PolygamousRanchKid+ · · Score: 5, Funny

    Could this have any applications there?

    "Well, I wasn't expecting The Spanish Mathematician . . ."

    --
    Schroedinger's Brexit: The UK is both in and out of the EU at the same time!
    1. Re:Cryptography? by MRe_nl · · Score: 4, Funny

      Our two main powers are insight into the nature of primes, fraud detection
      and stock market analysis.
      I'll come in again...

      --
      "Kill 'em all and let Root sort 'em out"
  9. Re:Why do people study "math" in college? by wjh31 · · Score: 4, Insightful

    hello troll, your inability to understand mathematics does not mean it has no real world application. her little project may well have been able to provide the basis for some ecomonic or social model, or may proove vital in unlocking the bit of physics that enables the next revolution in technology. Besides all these very important uses that skip the average joe, mathematics is often elegant and beautiful, and may be considered a form of art by some people

  10. Good for them by l00sr · · Score: 4, Funny

    Nobody expects the Spanish Mathematicians!

  11. Re:Why do people study "math" in college? by MikeUW · · Score: 3, Insightful

    Perhaps she was wondering the same about you as you walked away looking dumbfounded.

    Just because something is complicated and difficult for most people to grasp doesn't mean it hasn't got some real-world application at some point. That's why we need people like her to make sense of that sort of stuff, to the benefit of the rest of us.

  12. Re:9999991 by anss123 · · Score: 2, Interesting

    Explain one man being hit seven times with lightning. http://en.wikipedia.org/wiki/Roy_Sullivan

    Poor bastard. After the fourth! time he began carrying a pitcher of water with him... I find it hard not to be amused.

  13. Re:9 not too common? by doti · · Score: 4, Funny

    that makes my /. id even more impressive :)

    --
    factor 966971: 966971
  14. On the density of prime numbers by jonaskoelker · · Score: 4, Insightful

    Prime numbers, meanwhile, become decreasingly common as you get larger and larger, is that not correct?

    Yes, that is correct. There are roughly logarithmically many of them.

    Bertrand's Conjecture (proven by Chebyshev) states than for all n > 1, there's a prime p with n < p < 2n.

    If you look only at powers of two, it's readily seen that there are n primes between 1 and 2^n; setting k=2^n, there are log(k) primes between 1 and k.

    A logarithmic upper bound follows from the Prime Number Theorem, which doesn't have an easy proof (AFAIK). It says something much more specific than just "It's O(log n)", though. Maybe there's a simple theorem from which you can derive O(log n), but I don't know.

    1. Re:On the density of prime numbers by jonaskoelker · · Score: 4, Informative

      Maybe if I had read the prime number theorem, I would have known that it's O(n / log n), which is somewhat bigger...

  15. Plenty of reasons people study math by sirwired · · Score: 4, Insightful

    A few examples:

    For the same reason some people take Philosophy, Ancient Literature, Paleontology, etc. Because they think the subject is cool, and aren't necessarily at school to learn a trade. (Indeed, Engineering students that are paying attention also discover they aren't directly being taught a trade either. Or at least they aren't in any Engineering college worthy of the name.)

    They want to become an actuary. This is a fairly well-paid job that is also rather difficult to do, and even harder to do well.

    They want to become math teachers; a valuable and much-needed profession. Math is a useful tool in teaching students how to think. We certainly don't torture legions of high school students with the details of conic sections because anybody is under the impression this is a directly practical skill for most citizens to have. Nor are hundreds of thousands of college students subjected to the horrors of calculus because of some kind of employment program for math post-docs.

    They are double-majors in a field in which math is extremely important (physics, astronomy, computer science, every type of engineering, linguistics, medicine, biology, etc. Pretty much every field outside the humanities. Oh, and some of the humanities make extensive use of math too.)

    SirWired

  16. What the arXiv paper says by Anonymous Coward · · Score: 2, Informative

    Before I begin, I am a math phd candidate, but not in number theory. The following is probably better than a lay interpretation, but not an expert either.

    Basically, they have generalized BL (Benson's Law) to get a GBL. They then tested the primes in the range [1,10^11] against GBL, and verified they were satisfied. They DID NOT PROVE THIS HOLDS FOR ALL PRIMES!!! They then went on to conjecture the applications of this to other areas (finance, etc).

    Though the result is interesting, I really see this paper as a conjecture on the nature of primes, related to the Riemann zeta function. (From what I understand someone has proved zeros of the zeta function follow GBL.)

  17. Re:The real article, and what it does and doesn't by quarrel · · Score: 3, Insightful

    > That leaves me thinking: what does this article tell us that we couldn't find out ourselves by ripping through some prime numbers?

    Nothing?

    The important thing is that they ripped through some prime numbers and did notice, and they were the first to publish what they noticed.

    The world moves forward in tiny steps like this. Maybe the next mathematician gets his 'Ahuh' moment on the back of an insight like this and bang modern crypto is fucked. He might even be able to prove it for you.

    --Q

  18. If you're dealing with phone numbers by Ralph+Spoilsport · · Score: 5, Interesting
    It has less to do with math and more to do wit physics: as in how to use a an old school phone. Phone numbers, until comparatively recently would "prefer" lower numbers because they are EASIER TO DIAL. If a company had the phone number (909)999-9009 you would HATE dialing that thing. It would take about half a minute just to dial the damn number.

    Ssssshhhhhhik!
    diggadiggadiggadiggadiggadiggadiggadiggadigga!

    Total pain in the finger.

    1 as a first number was reserved for "other stuff" like international calls, so the lowest possible area codes (first numbers) went to places like New York City (212 - very quick to dial) or LA (213) because millions of people would be dialing that number, so it made for an overall faster dialing experience for (on average) more people.

    This is compared to the relatively few people who lived in more obscure parts of the country, like Saginaw MI (989) or Bryan TX (979).

    So, you have millions of phones in 212, thousands in 979. The result: saved effort in dialing.

    Also, to this end there was a preference for exchanges to have lower numbers as well to save on dialing effort, and phone numbers with lower (but NON-ZERO) values were sought after. You'd see advertisments like "Call RotoRooter - 213 464 1111 !" or "Call us NOW for a free analysis! 201 738 1122 !" etc. and so on.

    So, lower numbers in phone numbers have been a product of primitive dialing technology. Now with touchtone - all that is out the window - but the historic trend is still there and quite powerful - people will pay good money for a 212 area code for the distinction of being in the "real" New York Area code...

    RS

    --
    Shoes for Industry. Shoes for the Dead.
    1. Re:If you're dealing with phone numbers by Sir_Lewk · · Score: 2, Insightful

      Where are my mod points when I need them, that's pretty damned interesting.

      --
      "linux is just DOS with a UNIX like syntax" -- Galactic Dominator (944134)
    2. Re:If you're dealing with phone numbers by egcagrac0 · · Score: 2, Interesting

      Also sped up switching time on old style exchanges, right? The ten position relays at the CO that had to mechanically advance for each digga and were probably no fun to replace...

    3. Re:If you're dealing with phone numbers by jmp_nyc · · Score: 5, Informative

      While you're absolutely right about the reasoning behind NYC, LA, and Chicago getting 212, 213, and 312, you're a little off on the 989 and 979 area codes, which are much more recent.

      In the original system design, all area codes had a middle digit of 0 or 1. The convention was that a middle digit of 1 was used for area codes that only covered part of a state, while a middle digit of 0 was used for area codes that covered entire states. Furthermore, an area code could not begin with a 1 or a 0. and an area code with a middle digit of 1 couldn't have 1 as the third digit. (This left the shortest dial time area code for a statewide code as 201, which went to New Jersey.)

      As early as the late 1950s, the idea of single area codes for some states went out the window (with NJ splitting into 201 and 609 in 1958) because of increasing population and proliferation of phone service.

      By the late 1980s, the rules were further changed to allow for area codes with middle digits other than 1 or 0. Area codes like 989 and 979 weren't introduced until the late 1980s at the very earliest, by which point very few people were still using rotary phones. At one point, I had heard that the middle digit value of 9 was reserved for the future to allow for four digit area codes, but I can't vouch for the accuracy of that recollection. There are plenty of other rules, some of which you can see summarized here...
      -JMP

    4. Re:If you're dealing with phone numbers by jstott · · Score: 3, Informative

      So, you have millions of phones in 212, thousands in 979. The result: saved effort in dialing.

      Nice idea, but you give the phone company too much credit. In the old days telephone switches still used physical relays (this is well before transistors were invented). This significantly limited the number of connections in progress each switch could handle. Since switches are expensive, you naturally wanted to pass on the call as fast as possible so you could free up the switch for the next caller. A number like '212' wasn't just easy to dial, it was fast — remember this is the era of pulse dialing as well, so a '9' took literally 9 times longer to dial than a '1'. Assigning fast numbers like '212' to New York saved money for the phone company because Ma Bell could buy fewer switches. Any benefit to the customer was purely accidental.

      -JS

      --
      Vanity of vanities, all is vanity...
  19. Independent Verification by eldavojohn · · Score: 5, Interesting
    Here's what I got on my own counts using the first million primes:

    1: 415441
    2: 77025
    3: 75290
    4: 74114
    5: 72951
    6: 72257
    7: 71564
    8: 71038
    9: 70320

    Which puts the probabilities at:

    1: 0.415441
    2: 0.077025
    3: 0.07529
    4: 0.074114
    5: 0.072951
    6: 0.072257
    7: 0.071564
    8: 0.071038
    9: 0.07032

    My computer is currently crunching the first fifty million primes and I will post those as a reply to this post later today when it is done.

    These ratios on numbers 2-9 seem far too close in range for this to be a true log scale. Hopefully with more data it will be more logarithmic.

    --
    My work here is dung.
    1. Re:Independent Verification by Daimanta · · Score: 4, Funny

      This is one of those moments that I love /.
      Personally, I was trying to calculate the first 50M primes using the sieve of Erastothenes and then contructing a program that categorizes them but since you are doing all the work I say go ahead and I'll wait for the results.

      --
      Knowledge is power. Knowledge shared is power lost.
    2. Re:Independent Verification by Halo1 · · Score: 2, Insightful

      The millionth prime is 15,485,863. This means that he considered ~5.5 million more numbers that start with a 1 (10 million - 15.5 million) than numbers that start with any other digit.

      --
      Donate free food here
  20. Enron by Anna+Merikin · · Score: 4, Interesting

    was busted by auditors who found the books were "cooked" by applying the law of first numbers described in the /. blurb and TFA. The independent auditors found the first figures were randomly distributed instead of following Benford's law with the number 1 the most plentiful and nine the least -- therefore, the entries were fraudulent.

    Benford's law knocked my out at the time; I thought of how many bogus figures I had entered in my expense accounts over the years....

    1. Re:Enron by arth1 · · Score: 3, Informative

      At smaller scales than Enron, Benford and other related number distribution analysis schemes are indeed used to find fraud.

      Know the time report you fill out for the company you work at? There's a chance that it passes through a filter. If you make up figures for how long you spend at certain tasks, someone higher up may see it with a footnote saying "High probability of data being fictitious". If this pattern repeat itself over months, don't be surprised if your chances of retaining your job diminishes.

      On the other hand, you can use the statistics for your own advantage too. Not the least in games and gambling, where guessing your competitor's status and actions can change the odds quite dramatically. Including games and gambling you don't think of as games and gambling, like placing bids in auctions.

    2. Re:Enron by eison · · Score: 3, Interesting

      Great example. Here's a pretty good article on it: http://abcnews.go.com/print?id=98043

      I also like their explanation for "why":
      "Imagine that you deposit $1,000 in a bank at 10 percent compound interest per year. Next year you'll have $1,100, the year after that $1,210, then $1,331, and so on. The first digit of your bank account remains a "1" for a long time.

      When your account grows to more than $2,000, the first digit will remain a "2" for a shorter period as your interest increases. And when your deposit finally grows to more than $9,000, the 10 percent growth will result in more than $10,000 in your account the following year and a long return to "1" as the first digit. "

      --
      is competition good, or is duplication of effort bad?
  21. "...that surprisingly has gone unnoticed until now by DarkIye · · Score: 2, Funny

    They found that the distribution of the leading digit in the prime number sequence can be described by a generalization of Benford's law.

    Yeah, how did we miss that? We need to pay more attention.

  22. Benford's law explained by leromarinvit · · Score: 2, Informative

    This reminds me of an interesting article (PDF) I found a while back which explains Benford's law nicely. To quote:

    In short, the logarithmic pattern of leading digits comes from the manipulation of the data, and has nothing to do with patterns in the numbers being investigated.

    [...]

    The largest numbers in this set are about a million times greater in value than the smallest numbers. This extensive spread is a key part of stamping the logarithmic pattern into the data. That is, 543,923,100 must be divided by 100,000,000 to place it between 1 and 9.99999, while 1,221 only needs to be divided by 1,000. In other words, different numbers are being treated differently, all according to an anti-logarithmic pattern.

    --
    Proud member of the Ferengi Socialist Party.
  23. Re:9999991 by BeanThere · · Score: 2, Interesting

    Or (to put very crudely in layman-like terms): In a world where billions of things happen every single day, "1 in a million" events happen all the time.

  24. Not surprising at all by Mike_K · · Score: 3, Informative

    If you had asked me about the distribution of first digits of prime #s yesterday I probably would have guessed logarithmic, regardless of base (except for binary, of course).

    Think about it. We know that primary # are distributed logarithmically. A set of N digit #s has equal subsets of numbers starting with 1, 2, 3, etc. Those subsets are equal in size, exclusive and completely ordered with respect to each other. So it follows that the # of prime #s in consecutive subsets would be a logarithmic function. And if you add the sizes of prime subsets for each starting digit, you'll still get a logarithmic distribution.

    Nothing to see here, move along.

    m

    1. Re:Not surprising at all by domulys · · Score: 2, Interesting

      Agreed... in fact, I observed this same pattern back in 1998 (no kidding) in a report I wrote for my High School AP Statistics class (titled "On patterns in the distribution of prime numbers"). I submitted it for extra credit, and I got a B+.

      Guess I should have published that guy!

  25. Re:Counter-example ... by T+Murphy · · Score: 2, Funny

    ...good god my sarcasm detector failed, I deserve a mod down for that one.

  26. Choice of base is not mathematically relevant by exploder · · Score: 2, Interesting

    Mathematicians and mathematical results are generally indifferent to base. The mathematical properties of e, for instance, have nothing to do with its decimal expansion (other than the triviality that it never repeats because e is irrational). Mathematicians (and grad students like myself) almost never write something like "e =~ 2.71828...". It's true, but we don't care. There are far more interesting ways to characterize it, such as the base of the unique exponential function which is its own derivative.

    Changing from 10 to 16 would not help (or hurt) mathematics in the slightest. Try opening up a serious math book and looking for numerical constants greater than 9 (i.e. ones that would look different in hexadecimal). You won't find very many.

    Among the various bases, though, balanced ternary is kind of interesting.

    --
    Yo dawg, I heard you like the Ackermann function, so OH GOD OH GOD OH GOD
  27. Not predictive (just in case you were thinking it) by __roo · · Score: 3, Interesting

    If this is the first time you've run across Benford's law, you might thought to yourself, "Wow, I can use that to predict large prime numbers! I'll just convert numbers to base X, where X is really big, and only check numbers that start with 1."

    It's worth actually trying this, if you get a minute. You'll find that as X gets large, the number of primes that start with 2 gets closer to the number of primes tat start with 1. As X approaches infinity, your distribution approaches a smooth logarithmic curve.

    It's neat to see it yourself. This gives you an easy way to experiment with an infinite, easily generated set of numbers that follows Benford's law. It turns out that math actually works, oddly enough.

  28. Complete bullshit by gnasher719 · · Score: 4, Insightful

    The prime number theorem was conjectured in 1796 by Adrien-Marie Legendre and proved in 1896 independently by Jacques Hadamard and Charles Jean de la Vallée-Poussin. It says that if pi (N) denotes the number of primes p = N, then pi (N) / (N / ln N) converges towards 1; accordingly the number of primes between A and B is about (B / ln B - A / ln A). This shows that there should be slightly more d digit primes starting with 1 than with 2, 3, 4 etc. A reasonably good approximation is that the number of d digit primes starting with 1 is not 1/9 th of all d digit primes, but more precisely (11 1/9 + 5.7 / d) percent. This is all very, very simple maths. I don't think it hasn't been observed before, it was just never considered worth mentioning. However, the prime number theorem alone is not enough to prove this; it would be necessary to prove that convergence happens at a certain speed. So anything that these so-called "mathematicians" claim that depends on observations of large list of primes is pure nonsense.

    1. Re:Complete bullshit by emurphy42 · · Score: 2, Interesting

      I was thinking this myself at first, but apparently something goes wrong with it, because (per TFA) the distribution actually moves away from Benford's Law weighting and toward uniformity as the sample size grows larger. The specific rate of this movement is somehow described by a generalization of Benford's Law; while BL at one point uses 1/x, GBL uses 1/(x^a), with BL as the special case where a = 1.

  29. Re:I'd go for base 12 by blincoln · · Score: 3, Informative

    There on on 60's in a minute and 60 of those in an hour because we decided there should be.

    Actually, it's because the Sumerians and Babylonians used a base-60 counting system.

    --
    "...always new atoms but always doing the same dance, remembering what the dance was yesterday." -Richard Feynman
  30. Re:Why do people study "math" in college? by WCguru42 · · Score: 2, Insightful

    ...It's the same argument 'when am I ever going to use algebra/geometry [as taught in high school]'.

    As an electrical engineer, in undergrad, we were expected to already know a fairly large amount of algebraic and geometric/trigonometric relationships from high school and we never went over those principles in class. Now, if you're not going into a scientific/engineering/mathematics degree you're probably never going to need to use those principles, but it's a good thing to learn incase you don't know whether you want to be a technical student in college (if you even end up going).

    As an electrical-engineering undergraduate ... I would think that most people that go through a pure mathematics degree genuinely enjoy these processes... I can guarantee you that this mental training does give me an edge

    As an electrical engineering graduate student I can tell you that I genuinely loath my advanced mathematics courses. I'll say it straight up, they're hard as hell. But I will agree with you that because of those courses I've learned skills that allow me to produce better proofs and quicker understanding of mathematical relations in my linear systems, power systems, and dynamic allocations courses compared to my colleagues who have not taken more rigorous mathematics courses.

    I always enjoyed studying with the math students (me being the only non-mathematics graduate student). They always were looking for complete, rationally derived proofs, whereas I would be okay with accepting certain principles without a full proof. I don't think they ever understood how I could just assume certain things were correct and then move on to the next step. That's the difference between mathematicians and engineers; mathematicians want a thorough and rigorous proof and engineers are willing to get "just good enough" on the assumption that someone in the past did their mathematics correctly and their equations are correct.

    --
    "Educate the mind but never at the expense of the soul."~Blessed Basil Moreau
  31. Re:Is this surprising? by osu-neko · · Score: 2, Interesting

    I don't know, it just seems obvious.

    Um, yeah, when you summarize, you omit details (by definition). When the details you omit are the interesting details, what you're left with is indeed obvious and uninteresting.

    It's long been known that primes are more common on the low end. The interesting detail is the mathematical relationship between the actual amounts that end up in the various bins if you divide the range and count them up in each bin. Knowing there will be more in the lower bins doesn't tell you this, it just says there will be more in the lower bins. Benford's law tells you about how many (proportionally) will be in each bin. And it's not in any way an artifict of using a base 10 number system, the relationship remains true regardless of how many bins you use (10, 16, 8, whatever).

    --
    "Convictions are more dangerous enemies of truth than lies."
  32. Some More Information by eldavojohn · · Score: 5, Interesting

    So I read the comments and see that I need to do this in ranges or 1 to 100, 1 to 1000, etc. Which is fine, I've added another R method and would post the code here if it didn't yell at me for junk characters. So here are your Benford lists:

    All Primes 1-100
    Counted Occurances:
    4, 3, 3, 3, 3, 2, 4, 2, 1
    Frequencies:
    0.160, 0.120, 0.120, 0.120, 0.120, 0.080, 0.160, 0.080, 0.040

    All Primes 1-1,000
    Counted Occurances:
    25, 19, 19, 20, 17, 18, 18, 17, 15
    Frequencies:
    0.149, 0.113, 0.113, 0.119, 0.101, 0.107, 0.107, 0.101, 0.089

    All Primes 1-10,000
    Counted Occurances:
    160, 146, 139, 139, 131, 135, 125, 127, 127
    Frequencies:
    0.130, 0.119, 0.113, 0.113, 0.107, 0.110, 0.102, 0.103, 0.103

    All Primes 1-100,000
    Counted Occurances:
    1193, 1129, 1097, 1069, 1055, 1013, 1027, 1003, 1006
    Frequencies:
    0.124, 0.118, 0.114, 0.111, 0.110, 0.106, 0.107, 0.105, 0.105

    All Primes 1-1,000,000
    Counted Occurances:
    9585, 9142, 8960, 8747, 8615, 8458, 8435, 8326, 8230
    Frequencies:
    0.122, 0.116, 0.114, 0.111, 0.110, 0.108, 0.107, 0.106, 0.105

    All Primes 1-10,000,000
    Counted Occurances:
    80020, 77025, 75290, 74114, 72951, 72257, 71564, 71038, 70320
    Frequencies:
    0.120, 0.116, 0.113, 0.112, 0.110, 0.109, 0.108, 0.107, 0.106

    This is the raw data so to turn that into something visual, I dumped it into a Google spreadsheet and made it public (note the scale on the y axis). Enjoy!

    It seems that the curve is flattening out the more data I collect, but the logarithmic curve may be valid. I have the data for 100,000,000 and will add that to the spreadsheet once it completes.

    --
    My work here is dung.
  33. Re:9999991 by BaldingByMicrosoft · · Score: 2, Insightful

    Quite the story. More tragic to me is that a man can survive all that, but was done in by unrequited love... I suppose I'd rather be struck by lightning myself.

  34. Re:Surprising? by polemistes · · Score: 3, Interesting

    Actually, if you read the decimals of pi backwards, you'll get all the primes after each other.

  35. I Found a Fit! by eldavojohn · · Score: 5, Interesting
    The results for all primes between one and one hundred million:

    Counted Occurances:
    686048, 664277, 651085, 641594, 633932, 628206, 622882, 618610, 614821
    Frequencies:
    0.119, 0.115, 0.113, 0.111, 0.110, 0.109, 0.108, 0.107, 0.107

    So there's some more data for you. I added that to this spreadsheet.

    So I hope that satisfies everyone who replied to my thread first of all. I hope 5,761,455 primes between one and one hundred million satisfies you.

    I used a very simple Non Linear Squares model to solve for a single constant on a log of these values. I think I have a fit. Using Benford's model and the NLS Package in R, I found:

    f(x) = 0.020814 * log(161.147689 * ((x+1)/x))

    To fit quite nicely, here's the summary:

    Formula: y ~ Const1 * log(Const2 * ((x + 1)/x))

    Parameters:
    Estimate Std. Error t value Pr(>|t|)
    Const1 0.020814 0.001940 10.7292 1.343e-05 ***
    Const2 161.147689 80.222081 2.0088 0.08452 .
    ---

    Residual standard error: 0.0010413 on 7 degrees of freedom

    Number of iterations to convergence: 8
    Achieved convergence tolerance: 1.8104e-07

    Here is the list of frequencies next to what my model produced:

    Benford Prime Rates
    0.11907548
    0.11529674
    0.11300704
    0.11135972
    0.11002984
    0.10903600
    0.10811193
    0.10737045
    0.10671280

    NLS Model Results
    0.1202106
    0.11422279
    0.11177125
    0.11042794
    0.10957828
    0.10899193
    0.10856276
    0.10823497
    0.10797641

    I would wager that they are correct. Neat discovery!

    --
    My work here is dung.