Frequency of the Prime Numbers

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
5
down vote

favorite












Suppose I took all natural numbers less than or equal to $x$ and I picked one at random. Is there a way that we know of to express the probability that my number is prime in terms of $x$, for all $x$?



For example, for $x=12$, the prime numbers less than or equal to $x$ are $2,3,5,7$ and $11$, so my probability is $5/12$.







share|cite|improve this question


























    up vote
    5
    down vote

    favorite












    Suppose I took all natural numbers less than or equal to $x$ and I picked one at random. Is there a way that we know of to express the probability that my number is prime in terms of $x$, for all $x$?



    For example, for $x=12$, the prime numbers less than or equal to $x$ are $2,3,5,7$ and $11$, so my probability is $5/12$.







    share|cite|improve this question
























      up vote
      5
      down vote

      favorite









      up vote
      5
      down vote

      favorite











      Suppose I took all natural numbers less than or equal to $x$ and I picked one at random. Is there a way that we know of to express the probability that my number is prime in terms of $x$, for all $x$?



      For example, for $x=12$, the prime numbers less than or equal to $x$ are $2,3,5,7$ and $11$, so my probability is $5/12$.







      share|cite|improve this question














      Suppose I took all natural numbers less than or equal to $x$ and I picked one at random. Is there a way that we know of to express the probability that my number is prime in terms of $x$, for all $x$?



      For example, for $x=12$, the prime numbers less than or equal to $x$ are $2,3,5,7$ and $11$, so my probability is $5/12$.









      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Aug 8 at 10:33









      Jam

      4,35811330




      4,35811330










      asked Aug 8 at 10:27









      Tsing Shi Tao

      444




      444




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          23
          down vote













          There is no explicit formula, but the prime number theorem says that as $x$ tends to infinity, there are around $fracxln x$ primes $≤ x$.



          This means that the chance that a random number is prime will be around $fracxln x cdot frac1x = frac1ln x$.






          share|cite|improve this answer
















          • 4




            In OPs example, 1/ln(12) = 0.40 while 5/12 = 0.42.
            – infinitezero
            Aug 8 at 12:34










          • infinity is a bit further
            – dEmigOd
            Aug 8 at 12:35






          • 1




            @infinitezero The formula is not exact – I said the chance will be around that number. (By the way, this answer is blowing up!)
            – Toby Mak
            Aug 8 at 12:36











          • I know. I just pointed out that even for small X it's pretty close.
            – infinitezero
            Aug 8 at 12:37






          • 5




            $frac1ln x$ is the chance that a random number selected from the set $1,...,x$ will be prime.
            – probably_someone
            Aug 8 at 13:22











          Your Answer




          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "69"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2875887%2ffrequency-of-the-prime-numbers%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          23
          down vote













          There is no explicit formula, but the prime number theorem says that as $x$ tends to infinity, there are around $fracxln x$ primes $≤ x$.



          This means that the chance that a random number is prime will be around $fracxln x cdot frac1x = frac1ln x$.






          share|cite|improve this answer
















          • 4




            In OPs example, 1/ln(12) = 0.40 while 5/12 = 0.42.
            – infinitezero
            Aug 8 at 12:34










          • infinity is a bit further
            – dEmigOd
            Aug 8 at 12:35






          • 1




            @infinitezero The formula is not exact – I said the chance will be around that number. (By the way, this answer is blowing up!)
            – Toby Mak
            Aug 8 at 12:36











          • I know. I just pointed out that even for small X it's pretty close.
            – infinitezero
            Aug 8 at 12:37






          • 5




            $frac1ln x$ is the chance that a random number selected from the set $1,...,x$ will be prime.
            – probably_someone
            Aug 8 at 13:22















          up vote
          23
          down vote













          There is no explicit formula, but the prime number theorem says that as $x$ tends to infinity, there are around $fracxln x$ primes $≤ x$.



          This means that the chance that a random number is prime will be around $fracxln x cdot frac1x = frac1ln x$.






          share|cite|improve this answer
















          • 4




            In OPs example, 1/ln(12) = 0.40 while 5/12 = 0.42.
            – infinitezero
            Aug 8 at 12:34










          • infinity is a bit further
            – dEmigOd
            Aug 8 at 12:35






          • 1




            @infinitezero The formula is not exact – I said the chance will be around that number. (By the way, this answer is blowing up!)
            – Toby Mak
            Aug 8 at 12:36











          • I know. I just pointed out that even for small X it's pretty close.
            – infinitezero
            Aug 8 at 12:37






          • 5




            $frac1ln x$ is the chance that a random number selected from the set $1,...,x$ will be prime.
            – probably_someone
            Aug 8 at 13:22













          up vote
          23
          down vote










          up vote
          23
          down vote









          There is no explicit formula, but the prime number theorem says that as $x$ tends to infinity, there are around $fracxln x$ primes $≤ x$.



          This means that the chance that a random number is prime will be around $fracxln x cdot frac1x = frac1ln x$.






          share|cite|improve this answer












          There is no explicit formula, but the prime number theorem says that as $x$ tends to infinity, there are around $fracxln x$ primes $≤ x$.



          This means that the chance that a random number is prime will be around $fracxln x cdot frac1x = frac1ln x$.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Aug 8 at 10:29









          Toby Mak

          2,8051925




          2,8051925







          • 4




            In OPs example, 1/ln(12) = 0.40 while 5/12 = 0.42.
            – infinitezero
            Aug 8 at 12:34










          • infinity is a bit further
            – dEmigOd
            Aug 8 at 12:35






          • 1




            @infinitezero The formula is not exact – I said the chance will be around that number. (By the way, this answer is blowing up!)
            – Toby Mak
            Aug 8 at 12:36











          • I know. I just pointed out that even for small X it's pretty close.
            – infinitezero
            Aug 8 at 12:37






          • 5




            $frac1ln x$ is the chance that a random number selected from the set $1,...,x$ will be prime.
            – probably_someone
            Aug 8 at 13:22













          • 4




            In OPs example, 1/ln(12) = 0.40 while 5/12 = 0.42.
            – infinitezero
            Aug 8 at 12:34










          • infinity is a bit further
            – dEmigOd
            Aug 8 at 12:35






          • 1




            @infinitezero The formula is not exact – I said the chance will be around that number. (By the way, this answer is blowing up!)
            – Toby Mak
            Aug 8 at 12:36











          • I know. I just pointed out that even for small X it's pretty close.
            – infinitezero
            Aug 8 at 12:37






          • 5




            $frac1ln x$ is the chance that a random number selected from the set $1,...,x$ will be prime.
            – probably_someone
            Aug 8 at 13:22








          4




          4




          In OPs example, 1/ln(12) = 0.40 while 5/12 = 0.42.
          – infinitezero
          Aug 8 at 12:34




          In OPs example, 1/ln(12) = 0.40 while 5/12 = 0.42.
          – infinitezero
          Aug 8 at 12:34












          infinity is a bit further
          – dEmigOd
          Aug 8 at 12:35




          infinity is a bit further
          – dEmigOd
          Aug 8 at 12:35




          1




          1




          @infinitezero The formula is not exact – I said the chance will be around that number. (By the way, this answer is blowing up!)
          – Toby Mak
          Aug 8 at 12:36





          @infinitezero The formula is not exact – I said the chance will be around that number. (By the way, this answer is blowing up!)
          – Toby Mak
          Aug 8 at 12:36













          I know. I just pointed out that even for small X it's pretty close.
          – infinitezero
          Aug 8 at 12:37




          I know. I just pointed out that even for small X it's pretty close.
          – infinitezero
          Aug 8 at 12:37




          5




          5




          $frac1ln x$ is the chance that a random number selected from the set $1,...,x$ will be prime.
          – probably_someone
          Aug 8 at 13:22





          $frac1ln x$ is the chance that a random number selected from the set $1,...,x$ will be prime.
          – probably_someone
          Aug 8 at 13:22













           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2875887%2ffrequency-of-the-prime-numbers%23new-answer', 'question_page');

          );

          Post as a guest













































































          X iehX8 mFn89ZkE7T OmF mZvi,GwKF,8EAwHSClBhdM,I7XDPXd3Yg eWf6z,JYrazmDNcgWEB
          wU,c8mz8D8X fS TpCgI8CHHTjEI

          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          How many registers does an x86_64 CPU actually have?

          Displaying single band from multi-band raster using QGIS