Proof relatively prime numbers












2












$begingroup$


Let $p,q,r$ be three distinct prime numbers and $m = ptimes qtimes r$.
How many of the numbers {$1,2,...,m$} are relatively prime to $m$?



My attempt:




  1. $m=2 times 3 times 5=30$,


  2. $m=2times 3 times 7=42$,


  3. $m=3times 5times 7=105$,



and I see the pattern that relatively prime numbers to $m$ are prime numbers(and their powers) except {$p,q,r$}. Prime factorization of $m$ is $ptimes qtimes r$ and I can maybe argue that $m$ cannot be divided by any other prime number.



But how do I prove this more formally ? I can't see any formal way to do it.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Are you familiar with Euler’s totient function(en.m.wikipedia.org/wiki/Euler%27s_totient_function)?
    $endgroup$
    – Anurag A
    Dec 9 '18 at 19:17












  • $begingroup$
    I didn't realize it was Euler's totien function, thank you!
    $endgroup$
    – Glion
    Dec 9 '18 at 19:31
















2












$begingroup$


Let $p,q,r$ be three distinct prime numbers and $m = ptimes qtimes r$.
How many of the numbers {$1,2,...,m$} are relatively prime to $m$?



My attempt:




  1. $m=2 times 3 times 5=30$,


  2. $m=2times 3 times 7=42$,


  3. $m=3times 5times 7=105$,



and I see the pattern that relatively prime numbers to $m$ are prime numbers(and their powers) except {$p,q,r$}. Prime factorization of $m$ is $ptimes qtimes r$ and I can maybe argue that $m$ cannot be divided by any other prime number.



But how do I prove this more formally ? I can't see any formal way to do it.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Are you familiar with Euler’s totient function(en.m.wikipedia.org/wiki/Euler%27s_totient_function)?
    $endgroup$
    – Anurag A
    Dec 9 '18 at 19:17












  • $begingroup$
    I didn't realize it was Euler's totien function, thank you!
    $endgroup$
    – Glion
    Dec 9 '18 at 19:31














2












2








2





$begingroup$


Let $p,q,r$ be three distinct prime numbers and $m = ptimes qtimes r$.
How many of the numbers {$1,2,...,m$} are relatively prime to $m$?



My attempt:




  1. $m=2 times 3 times 5=30$,


  2. $m=2times 3 times 7=42$,


  3. $m=3times 5times 7=105$,



and I see the pattern that relatively prime numbers to $m$ are prime numbers(and their powers) except {$p,q,r$}. Prime factorization of $m$ is $ptimes qtimes r$ and I can maybe argue that $m$ cannot be divided by any other prime number.



But how do I prove this more formally ? I can't see any formal way to do it.










share|cite|improve this question











$endgroup$




Let $p,q,r$ be three distinct prime numbers and $m = ptimes qtimes r$.
How many of the numbers {$1,2,...,m$} are relatively prime to $m$?



My attempt:




  1. $m=2 times 3 times 5=30$,


  2. $m=2times 3 times 7=42$,


  3. $m=3times 5times 7=105$,



and I see the pattern that relatively prime numbers to $m$ are prime numbers(and their powers) except {$p,q,r$}. Prime factorization of $m$ is $ptimes qtimes r$ and I can maybe argue that $m$ cannot be divided by any other prime number.



But how do I prove this more formally ? I can't see any formal way to do it.







number-theory prime-numbers






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 17 '18 at 16:57









Klangen

1,72311334




1,72311334










asked Dec 9 '18 at 19:15









GlionGlion

334




334








  • 1




    $begingroup$
    Are you familiar with Euler’s totient function(en.m.wikipedia.org/wiki/Euler%27s_totient_function)?
    $endgroup$
    – Anurag A
    Dec 9 '18 at 19:17












  • $begingroup$
    I didn't realize it was Euler's totien function, thank you!
    $endgroup$
    – Glion
    Dec 9 '18 at 19:31














  • 1




    $begingroup$
    Are you familiar with Euler’s totient function(en.m.wikipedia.org/wiki/Euler%27s_totient_function)?
    $endgroup$
    – Anurag A
    Dec 9 '18 at 19:17












  • $begingroup$
    I didn't realize it was Euler's totien function, thank you!
    $endgroup$
    – Glion
    Dec 9 '18 at 19:31








1




1




$begingroup$
Are you familiar with Euler’s totient function(en.m.wikipedia.org/wiki/Euler%27s_totient_function)?
$endgroup$
– Anurag A
Dec 9 '18 at 19:17






$begingroup$
Are you familiar with Euler’s totient function(en.m.wikipedia.org/wiki/Euler%27s_totient_function)?
$endgroup$
– Anurag A
Dec 9 '18 at 19:17














$begingroup$
I didn't realize it was Euler's totien function, thank you!
$endgroup$
– Glion
Dec 9 '18 at 19:31




$begingroup$
I didn't realize it was Euler's totien function, thank you!
$endgroup$
– Glion
Dec 9 '18 at 19:31










3 Answers
3






active

oldest

votes


















1












$begingroup$

You can clearly see it from Euler's totient function.






share|cite|improve this answer









$endgroup$





















    4












    $begingroup$

    The solution to this is given by Euler's totient function, which can be computed explicitly using Euler's product formula (see: here)



    If this machinery seems too complex, since the number you're dealing with only has three primes in its prime factorization, you could consider a "Brute Force" approach:



    Let $A^{ell}_{m} :={{x : x=ccdot ell, cin mathbb{N}, xleq m}}$



    Note that the sets $A^{p}_{m}, A^{q}_{m}, A^{r}_{m}, A^{pq}_{m}, A^{pr}_{m}, A^{qr}_{m}$ contain all natural numbers that are NOT relatively prime to $m$.



    So how many of the numbers ${{1,2,...,m}}$ are relatively prime to $m$?
    $$m-vert A^{p}_{m} cup A^{q}_{m}cup A^{r}_{m}cup A^{pq}_{m}cup A^{pr}_{m}cup A^{qr}_{m} vert $$



    Note that there is some overlap between these sets, but the size of the union can easily be determined using inclusion-exclusion.






    share|cite|improve this answer









    $endgroup$





















      2












      $begingroup$

      This is a simple counting problem disguised as number theory. Among the numbers $1,2,ldots,m$, it is easy to count the number of multiples of $p$, those which are multiples of $q$, and those which are multiples of $r$. Now we need to exclude numbers which we counted twice, and add back those we excluded too many times. This idea is known as the Principle of Inclusion and Exclusion and is a well-known method of counting. This can be applied to your case to find the answer, and can also be generalised to an arbitrary number of primes.






      share|cite|improve this answer









      $endgroup$













        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',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        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%2f3032821%2fproof-relatively-prime-numbers%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        1












        $begingroup$

        You can clearly see it from Euler's totient function.






        share|cite|improve this answer









        $endgroup$


















          1












          $begingroup$

          You can clearly see it from Euler's totient function.






          share|cite|improve this answer









          $endgroup$
















            1












            1








            1





            $begingroup$

            You can clearly see it from Euler's totient function.






            share|cite|improve this answer









            $endgroup$



            You can clearly see it from Euler's totient function.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Jan 13 at 16:13









            scarfacescarface

            707




            707























                4












                $begingroup$

                The solution to this is given by Euler's totient function, which can be computed explicitly using Euler's product formula (see: here)



                If this machinery seems too complex, since the number you're dealing with only has three primes in its prime factorization, you could consider a "Brute Force" approach:



                Let $A^{ell}_{m} :={{x : x=ccdot ell, cin mathbb{N}, xleq m}}$



                Note that the sets $A^{p}_{m}, A^{q}_{m}, A^{r}_{m}, A^{pq}_{m}, A^{pr}_{m}, A^{qr}_{m}$ contain all natural numbers that are NOT relatively prime to $m$.



                So how many of the numbers ${{1,2,...,m}}$ are relatively prime to $m$?
                $$m-vert A^{p}_{m} cup A^{q}_{m}cup A^{r}_{m}cup A^{pq}_{m}cup A^{pr}_{m}cup A^{qr}_{m} vert $$



                Note that there is some overlap between these sets, but the size of the union can easily be determined using inclusion-exclusion.






                share|cite|improve this answer









                $endgroup$


















                  4












                  $begingroup$

                  The solution to this is given by Euler's totient function, which can be computed explicitly using Euler's product formula (see: here)



                  If this machinery seems too complex, since the number you're dealing with only has three primes in its prime factorization, you could consider a "Brute Force" approach:



                  Let $A^{ell}_{m} :={{x : x=ccdot ell, cin mathbb{N}, xleq m}}$



                  Note that the sets $A^{p}_{m}, A^{q}_{m}, A^{r}_{m}, A^{pq}_{m}, A^{pr}_{m}, A^{qr}_{m}$ contain all natural numbers that are NOT relatively prime to $m$.



                  So how many of the numbers ${{1,2,...,m}}$ are relatively prime to $m$?
                  $$m-vert A^{p}_{m} cup A^{q}_{m}cup A^{r}_{m}cup A^{pq}_{m}cup A^{pr}_{m}cup A^{qr}_{m} vert $$



                  Note that there is some overlap between these sets, but the size of the union can easily be determined using inclusion-exclusion.






                  share|cite|improve this answer









                  $endgroup$
















                    4












                    4








                    4





                    $begingroup$

                    The solution to this is given by Euler's totient function, which can be computed explicitly using Euler's product formula (see: here)



                    If this machinery seems too complex, since the number you're dealing with only has three primes in its prime factorization, you could consider a "Brute Force" approach:



                    Let $A^{ell}_{m} :={{x : x=ccdot ell, cin mathbb{N}, xleq m}}$



                    Note that the sets $A^{p}_{m}, A^{q}_{m}, A^{r}_{m}, A^{pq}_{m}, A^{pr}_{m}, A^{qr}_{m}$ contain all natural numbers that are NOT relatively prime to $m$.



                    So how many of the numbers ${{1,2,...,m}}$ are relatively prime to $m$?
                    $$m-vert A^{p}_{m} cup A^{q}_{m}cup A^{r}_{m}cup A^{pq}_{m}cup A^{pr}_{m}cup A^{qr}_{m} vert $$



                    Note that there is some overlap between these sets, but the size of the union can easily be determined using inclusion-exclusion.






                    share|cite|improve this answer









                    $endgroup$



                    The solution to this is given by Euler's totient function, which can be computed explicitly using Euler's product formula (see: here)



                    If this machinery seems too complex, since the number you're dealing with only has three primes in its prime factorization, you could consider a "Brute Force" approach:



                    Let $A^{ell}_{m} :={{x : x=ccdot ell, cin mathbb{N}, xleq m}}$



                    Note that the sets $A^{p}_{m}, A^{q}_{m}, A^{r}_{m}, A^{pq}_{m}, A^{pr}_{m}, A^{qr}_{m}$ contain all natural numbers that are NOT relatively prime to $m$.



                    So how many of the numbers ${{1,2,...,m}}$ are relatively prime to $m$?
                    $$m-vert A^{p}_{m} cup A^{q}_{m}cup A^{r}_{m}cup A^{pq}_{m}cup A^{pr}_{m}cup A^{qr}_{m} vert $$



                    Note that there is some overlap between these sets, but the size of the union can easily be determined using inclusion-exclusion.







                    share|cite|improve this answer












                    share|cite|improve this answer



                    share|cite|improve this answer










                    answered Dec 9 '18 at 19:37









                    mm8511mm8511

                    54328




                    54328























                        2












                        $begingroup$

                        This is a simple counting problem disguised as number theory. Among the numbers $1,2,ldots,m$, it is easy to count the number of multiples of $p$, those which are multiples of $q$, and those which are multiples of $r$. Now we need to exclude numbers which we counted twice, and add back those we excluded too many times. This idea is known as the Principle of Inclusion and Exclusion and is a well-known method of counting. This can be applied to your case to find the answer, and can also be generalised to an arbitrary number of primes.






                        share|cite|improve this answer









                        $endgroup$


















                          2












                          $begingroup$

                          This is a simple counting problem disguised as number theory. Among the numbers $1,2,ldots,m$, it is easy to count the number of multiples of $p$, those which are multiples of $q$, and those which are multiples of $r$. Now we need to exclude numbers which we counted twice, and add back those we excluded too many times. This idea is known as the Principle of Inclusion and Exclusion and is a well-known method of counting. This can be applied to your case to find the answer, and can also be generalised to an arbitrary number of primes.






                          share|cite|improve this answer









                          $endgroup$
















                            2












                            2








                            2





                            $begingroup$

                            This is a simple counting problem disguised as number theory. Among the numbers $1,2,ldots,m$, it is easy to count the number of multiples of $p$, those which are multiples of $q$, and those which are multiples of $r$. Now we need to exclude numbers which we counted twice, and add back those we excluded too many times. This idea is known as the Principle of Inclusion and Exclusion and is a well-known method of counting. This can be applied to your case to find the answer, and can also be generalised to an arbitrary number of primes.






                            share|cite|improve this answer









                            $endgroup$



                            This is a simple counting problem disguised as number theory. Among the numbers $1,2,ldots,m$, it is easy to count the number of multiples of $p$, those which are multiples of $q$, and those which are multiples of $r$. Now we need to exclude numbers which we counted twice, and add back those we excluded too many times. This idea is known as the Principle of Inclusion and Exclusion and is a well-known method of counting. This can be applied to your case to find the answer, and can also be generalised to an arbitrary number of primes.







                            share|cite|improve this answer












                            share|cite|improve this answer



                            share|cite|improve this answer










                            answered Dec 9 '18 at 23:59









                            YiFanYiFan

                            3,0161424




                            3,0161424






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Mathematics Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                Use MathJax to format equations. MathJax reference.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3032821%2fproof-relatively-prime-numbers%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Quarter-circle Tiles

                                build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                                Mont Emei