Count Integers Not Greater Than $a$ Coprime To $b$number of coprimes to a less than bEuler's totient function and complex numbersCounting elements of reduced residue systems modulo one number which are smaller than anotherIn a given sequence of consecutive integers, finding the count of integers with a least prime factor greater than $p$Eulers totient function divided by $n$, counting numbers in the set [1,m] that are coprime to nEuler's theorem (modular arithmetic) for non-coprime integersFor $n > 2, n in mathbbZ$, show the sum of integers coprime to $n$ in the range $[1,n-1]$ is equal to $frac12n phi(n)$Proof any arithmetic progression coprime count same as toting function of nHow to count the number of perfect square greater than $N$ and less than $N^2$ that are relatively prime to $N$?How many numbers less than $m$ and relatively prime to $n$, where $m>n$?Are there any known methods for finding Upper/Lower bounds on the number of Totients of x less than another number y?

Closed subgroups of abelian groups

"which" command doesn't work / path of Safari?

What are these boxed doors outside store fronts in New York?

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

Infinite past with a beginning?

Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?

Why do we use polarized capacitor?

What is the white spray-pattern residue inside these Falcon Heavy nozzles?

Is there really no realistic way for a skeleton monster to move around without magic?

What defenses are there against being summoned by the Gate spell?

What does "enim et" mean?

A Journey Through Space and Time

I see my dog run

How old can references or sources in a thesis be?

Why CLRS example on residual networks does not follows its formula?

How to use Pandas to get the count of every combination inclusive

Concept of linear mappings are confusing me

Chess with symmetric move-square

Draw simple lines in Inkscape

How do I create uniquely male characters?

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

If Manufacturer spice model and Datasheet give different values which should I use?

cryptic clue: mammal sounds like relative consumer (8)

Why is an old chain unsafe?



Count Integers Not Greater Than $a$ Coprime To $b$


number of coprimes to a less than bEuler's totient function and complex numbersCounting elements of reduced residue systems modulo one number which are smaller than anotherIn a given sequence of consecutive integers, finding the count of integers with a least prime factor greater than $p$Eulers totient function divided by $n$, counting numbers in the set [1,m] that are coprime to nEuler's theorem (modular arithmetic) for non-coprime integersFor $n > 2, n in mathbbZ$, show the sum of integers coprime to $n$ in the range $[1,n-1]$ is equal to $frac12n phi(n)$Proof any arithmetic progression coprime count same as toting function of nHow to count the number of perfect square greater than $N$ and less than $N^2$ that are relatively prime to $N$?How many numbers less than $m$ and relatively prime to $n$, where $m>n$?Are there any known methods for finding Upper/Lower bounds on the number of Totients of x less than another number y?













2












$begingroup$


I'd like to ask how to count $f(a,b)$, the number of integers not greater than $a$ which are coprime to a given number $b$. Can $f$ be expressed using Euler's totient function?










share|cite|improve this question









$endgroup$
















    2












    $begingroup$


    I'd like to ask how to count $f(a,b)$, the number of integers not greater than $a$ which are coprime to a given number $b$. Can $f$ be expressed using Euler's totient function?










    share|cite|improve this question









    $endgroup$














      2












      2








      2





      $begingroup$


      I'd like to ask how to count $f(a,b)$, the number of integers not greater than $a$ which are coprime to a given number $b$. Can $f$ be expressed using Euler's totient function?










      share|cite|improve this question









      $endgroup$




      I'd like to ask how to count $f(a,b)$, the number of integers not greater than $a$ which are coprime to a given number $b$. Can $f$ be expressed using Euler's totient function?







      combinatorics elementary-number-theory totient-function coprime






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Mar 22 at 11:02









      Hang WuHang Wu

      551312




      551312




















          2 Answers
          2






          active

          oldest

          votes


















          3












          $begingroup$

          You can do this using the basic property of the Mobius function $mu$, which is
          $$ sum_dmid m mu(d) = begincases 1, m=1 \ 0, m>1 endcases $$
          (where $m$ is a positive integer, and summation extends over all positive divisors $d$ of $m$). Namely, we have
          $$ f(a,b) = sum_n=1^a sum_dmid(n,b)mu(d) = sum_dmid b mu(d) sum_substack1le nle a\dmid n 1. $$
          The inner sum counts all integers $nin[1,a]$ divisible by $d$; hence, is equal to $lfloor a/drfloor$. This gives
          $$ f(a,b) = sum_dmid b mu(d) lfloor a/drfloor. $$
          This is an exact formula which can be used to efficiently compute your $f(a,b)$. You can also use it to get a good approximation: since $lfloor a/drfloor=a/d-theta$, where $|theta|<1$,
          $$ f(a,b) = asum_dmid b fracmu(d)d + R = afracvarphi(b)b + R, $$
          where $|R|$ does not exceed the number of divisors of $b$.






          share|cite|improve this answer









          $endgroup$




















            0












            $begingroup$

            In some cases yes $f$ can be expressed in terms of Eulers totient function. Any time b divides a, $f(a,b)$ is simply $fracabphi(b)$. Euler totient function can also be written in terms of $f$ though. Euler totient function is $$prod_pf(p,p)$$ in general $f(a,b)$ is $lfloorfracabrfloorphi(b)$ plus the cardinality of the set of numbers (via inclusion-exclusion principle or f itself) not divisible by a prime factor of b less than $abmod b$






            share|cite|improve this answer











            $endgroup$












            • $begingroup$
              So you mean $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq a\ forall p < a mod b bigwedge p1$?
              $endgroup$
              – Hang Wu
              Mar 23 at 3:16











            • $begingroup$
              But I think the formula should be $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq (a mod b) \ gcd(i,b)=11$.
              $endgroup$
              – Hang Wu
              Mar 23 at 3:35










            • $begingroup$
              $a=1005,b=200; f(a,b)= 5(80)+1(4)-2(1)$ because 2 and 5 are less than or equal to 5. 5 leaves 4 coprime to it, 2 takes away 2 of them. this leaves 5(80)+2= 402 numbers coprime to 200.
              $endgroup$
              – Roddy MacPhee
              Mar 23 at 12:57











            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%2f3158012%2fcount-integers-not-greater-than-a-coprime-to-b%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3












            $begingroup$

            You can do this using the basic property of the Mobius function $mu$, which is
            $$ sum_dmid m mu(d) = begincases 1, m=1 \ 0, m>1 endcases $$
            (where $m$ is a positive integer, and summation extends over all positive divisors $d$ of $m$). Namely, we have
            $$ f(a,b) = sum_n=1^a sum_dmid(n,b)mu(d) = sum_dmid b mu(d) sum_substack1le nle a\dmid n 1. $$
            The inner sum counts all integers $nin[1,a]$ divisible by $d$; hence, is equal to $lfloor a/drfloor$. This gives
            $$ f(a,b) = sum_dmid b mu(d) lfloor a/drfloor. $$
            This is an exact formula which can be used to efficiently compute your $f(a,b)$. You can also use it to get a good approximation: since $lfloor a/drfloor=a/d-theta$, where $|theta|<1$,
            $$ f(a,b) = asum_dmid b fracmu(d)d + R = afracvarphi(b)b + R, $$
            where $|R|$ does not exceed the number of divisors of $b$.






            share|cite|improve this answer









            $endgroup$

















              3












              $begingroup$

              You can do this using the basic property of the Mobius function $mu$, which is
              $$ sum_dmid m mu(d) = begincases 1, m=1 \ 0, m>1 endcases $$
              (where $m$ is a positive integer, and summation extends over all positive divisors $d$ of $m$). Namely, we have
              $$ f(a,b) = sum_n=1^a sum_dmid(n,b)mu(d) = sum_dmid b mu(d) sum_substack1le nle a\dmid n 1. $$
              The inner sum counts all integers $nin[1,a]$ divisible by $d$; hence, is equal to $lfloor a/drfloor$. This gives
              $$ f(a,b) = sum_dmid b mu(d) lfloor a/drfloor. $$
              This is an exact formula which can be used to efficiently compute your $f(a,b)$. You can also use it to get a good approximation: since $lfloor a/drfloor=a/d-theta$, where $|theta|<1$,
              $$ f(a,b) = asum_dmid b fracmu(d)d + R = afracvarphi(b)b + R, $$
              where $|R|$ does not exceed the number of divisors of $b$.






              share|cite|improve this answer









              $endgroup$















                3












                3








                3





                $begingroup$

                You can do this using the basic property of the Mobius function $mu$, which is
                $$ sum_dmid m mu(d) = begincases 1, m=1 \ 0, m>1 endcases $$
                (where $m$ is a positive integer, and summation extends over all positive divisors $d$ of $m$). Namely, we have
                $$ f(a,b) = sum_n=1^a sum_dmid(n,b)mu(d) = sum_dmid b mu(d) sum_substack1le nle a\dmid n 1. $$
                The inner sum counts all integers $nin[1,a]$ divisible by $d$; hence, is equal to $lfloor a/drfloor$. This gives
                $$ f(a,b) = sum_dmid b mu(d) lfloor a/drfloor. $$
                This is an exact formula which can be used to efficiently compute your $f(a,b)$. You can also use it to get a good approximation: since $lfloor a/drfloor=a/d-theta$, where $|theta|<1$,
                $$ f(a,b) = asum_dmid b fracmu(d)d + R = afracvarphi(b)b + R, $$
                where $|R|$ does not exceed the number of divisors of $b$.






                share|cite|improve this answer









                $endgroup$



                You can do this using the basic property of the Mobius function $mu$, which is
                $$ sum_dmid m mu(d) = begincases 1, m=1 \ 0, m>1 endcases $$
                (where $m$ is a positive integer, and summation extends over all positive divisors $d$ of $m$). Namely, we have
                $$ f(a,b) = sum_n=1^a sum_dmid(n,b)mu(d) = sum_dmid b mu(d) sum_substack1le nle a\dmid n 1. $$
                The inner sum counts all integers $nin[1,a]$ divisible by $d$; hence, is equal to $lfloor a/drfloor$. This gives
                $$ f(a,b) = sum_dmid b mu(d) lfloor a/drfloor. $$
                This is an exact formula which can be used to efficiently compute your $f(a,b)$. You can also use it to get a good approximation: since $lfloor a/drfloor=a/d-theta$, where $|theta|<1$,
                $$ f(a,b) = asum_dmid b fracmu(d)d + R = afracvarphi(b)b + R, $$
                where $|R|$ does not exceed the number of divisors of $b$.







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Mar 22 at 11:36









                W-t-PW-t-P

                1,614612




                1,614612





















                    0












                    $begingroup$

                    In some cases yes $f$ can be expressed in terms of Eulers totient function. Any time b divides a, $f(a,b)$ is simply $fracabphi(b)$. Euler totient function can also be written in terms of $f$ though. Euler totient function is $$prod_pf(p,p)$$ in general $f(a,b)$ is $lfloorfracabrfloorphi(b)$ plus the cardinality of the set of numbers (via inclusion-exclusion principle or f itself) not divisible by a prime factor of b less than $abmod b$






                    share|cite|improve this answer











                    $endgroup$












                    • $begingroup$
                      So you mean $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq a\ forall p < a mod b bigwedge p1$?
                      $endgroup$
                      – Hang Wu
                      Mar 23 at 3:16











                    • $begingroup$
                      But I think the formula should be $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq (a mod b) \ gcd(i,b)=11$.
                      $endgroup$
                      – Hang Wu
                      Mar 23 at 3:35










                    • $begingroup$
                      $a=1005,b=200; f(a,b)= 5(80)+1(4)-2(1)$ because 2 and 5 are less than or equal to 5. 5 leaves 4 coprime to it, 2 takes away 2 of them. this leaves 5(80)+2= 402 numbers coprime to 200.
                      $endgroup$
                      – Roddy MacPhee
                      Mar 23 at 12:57















                    0












                    $begingroup$

                    In some cases yes $f$ can be expressed in terms of Eulers totient function. Any time b divides a, $f(a,b)$ is simply $fracabphi(b)$. Euler totient function can also be written in terms of $f$ though. Euler totient function is $$prod_pf(p,p)$$ in general $f(a,b)$ is $lfloorfracabrfloorphi(b)$ plus the cardinality of the set of numbers (via inclusion-exclusion principle or f itself) not divisible by a prime factor of b less than $abmod b$






                    share|cite|improve this answer











                    $endgroup$












                    • $begingroup$
                      So you mean $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq a\ forall p < a mod b bigwedge p1$?
                      $endgroup$
                      – Hang Wu
                      Mar 23 at 3:16











                    • $begingroup$
                      But I think the formula should be $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq (a mod b) \ gcd(i,b)=11$.
                      $endgroup$
                      – Hang Wu
                      Mar 23 at 3:35










                    • $begingroup$
                      $a=1005,b=200; f(a,b)= 5(80)+1(4)-2(1)$ because 2 and 5 are less than or equal to 5. 5 leaves 4 coprime to it, 2 takes away 2 of them. this leaves 5(80)+2= 402 numbers coprime to 200.
                      $endgroup$
                      – Roddy MacPhee
                      Mar 23 at 12:57













                    0












                    0








                    0





                    $begingroup$

                    In some cases yes $f$ can be expressed in terms of Eulers totient function. Any time b divides a, $f(a,b)$ is simply $fracabphi(b)$. Euler totient function can also be written in terms of $f$ though. Euler totient function is $$prod_pf(p,p)$$ in general $f(a,b)$ is $lfloorfracabrfloorphi(b)$ plus the cardinality of the set of numbers (via inclusion-exclusion principle or f itself) not divisible by a prime factor of b less than $abmod b$






                    share|cite|improve this answer











                    $endgroup$



                    In some cases yes $f$ can be expressed in terms of Eulers totient function. Any time b divides a, $f(a,b)$ is simply $fracabphi(b)$. Euler totient function can also be written in terms of $f$ though. Euler totient function is $$prod_pf(p,p)$$ in general $f(a,b)$ is $lfloorfracabrfloorphi(b)$ plus the cardinality of the set of numbers (via inclusion-exclusion principle or f itself) not divisible by a prime factor of b less than $abmod b$







                    share|cite|improve this answer














                    share|cite|improve this answer



                    share|cite|improve this answer








                    edited Mar 23 at 0:58

























                    answered Mar 23 at 0:48









                    Roddy MacPheeRoddy MacPhee

                    722118




                    722118











                    • $begingroup$
                      So you mean $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq a\ forall p < a mod b bigwedge p1$?
                      $endgroup$
                      – Hang Wu
                      Mar 23 at 3:16











                    • $begingroup$
                      But I think the formula should be $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq (a mod b) \ gcd(i,b)=11$.
                      $endgroup$
                      – Hang Wu
                      Mar 23 at 3:35










                    • $begingroup$
                      $a=1005,b=200; f(a,b)= 5(80)+1(4)-2(1)$ because 2 and 5 are less than or equal to 5. 5 leaves 4 coprime to it, 2 takes away 2 of them. this leaves 5(80)+2= 402 numbers coprime to 200.
                      $endgroup$
                      – Roddy MacPhee
                      Mar 23 at 12:57
















                    • $begingroup$
                      So you mean $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq a\ forall p < a mod b bigwedge p1$?
                      $endgroup$
                      – Hang Wu
                      Mar 23 at 3:16











                    • $begingroup$
                      But I think the formula should be $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq (a mod b) \ gcd(i,b)=11$.
                      $endgroup$
                      – Hang Wu
                      Mar 23 at 3:35










                    • $begingroup$
                      $a=1005,b=200; f(a,b)= 5(80)+1(4)-2(1)$ because 2 and 5 are less than or equal to 5. 5 leaves 4 coprime to it, 2 takes away 2 of them. this leaves 5(80)+2= 402 numbers coprime to 200.
                      $endgroup$
                      – Roddy MacPhee
                      Mar 23 at 12:57















                    $begingroup$
                    So you mean $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq a\ forall p < a mod b bigwedge p1$?
                    $endgroup$
                    – Hang Wu
                    Mar 23 at 3:16





                    $begingroup$
                    So you mean $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq a\ forall p < a mod b bigwedge p1$?
                    $endgroup$
                    – Hang Wu
                    Mar 23 at 3:16













                    $begingroup$
                    But I think the formula should be $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq (a mod b) \ gcd(i,b)=11$.
                    $endgroup$
                    – Hang Wu
                    Mar 23 at 3:35




                    $begingroup$
                    But I think the formula should be $f(a,b)=lfloorfracabrfloorphi(b)+sum_substack1leq i leq (a mod b) \ gcd(i,b)=11$.
                    $endgroup$
                    – Hang Wu
                    Mar 23 at 3:35












                    $begingroup$
                    $a=1005,b=200; f(a,b)= 5(80)+1(4)-2(1)$ because 2 and 5 are less than or equal to 5. 5 leaves 4 coprime to it, 2 takes away 2 of them. this leaves 5(80)+2= 402 numbers coprime to 200.
                    $endgroup$
                    – Roddy MacPhee
                    Mar 23 at 12:57




                    $begingroup$
                    $a=1005,b=200; f(a,b)= 5(80)+1(4)-2(1)$ because 2 and 5 are less than or equal to 5. 5 leaves 4 coprime to it, 2 takes away 2 of them. this leaves 5(80)+2= 402 numbers coprime to 200.
                    $endgroup$
                    – Roddy MacPhee
                    Mar 23 at 12:57

















                    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%2f3158012%2fcount-integers-not-greater-than-a-coprime-to-b%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

                    How should I support this large drywall patch? Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How do I cover large gaps in drywall?How do I keep drywall around a patch from crumbling?Can I glue a second layer of drywall?How to patch long strip on drywall?Large drywall patch: how to avoid bulging seams?Drywall Mesh Patch vs. Bulge? To remove or not to remove?How to fix this drywall job?Prep drywall before backsplashWhat's the best way to fix this horrible drywall patch job?Drywall patching using 3M Patch Plus Primer

                    random experiment with two different functions on unit interval Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Random variable and probability space notionsRandom Walk with EdgesFinding functions where the increase over a random interval is Poisson distributedNumber of days until dayCan an observed event in fact be of zero probability?Unit random processmodels of coins and uniform distributionHow to get the number of successes given $n$ trials , probability $P$ and a random variable $X$Absorbing Markov chain in a computer. Is “almost every” turned into always convergence in computer executions?Stopped random walk is not uniformly integrable

                    Lowndes Grove History Architecture References Navigation menu32°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661132°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661178002500"National Register Information System"Historic houses of South Carolina"Lowndes Grove""+32° 48' 6.00", −79° 57' 58.00""Lowndes Grove, Charleston County (260 St. Margaret St., Charleston)""Lowndes Grove"The Charleston ExpositionIt Happened in South Carolina"Lowndes Grove (House), Saint Margaret Street & Sixth Avenue, Charleston, Charleston County, SC(Photographs)"Plantations of the Carolina Low Countrye