How do you find all $n$ such that $phi(n)|n$












9














Where $phi(n)$ is the Euler phi function, how do you find all $n$ such that $phi(n)|n$?










share|cite|improve this question


















  • 4




    mathforum.org/kb/… and oeis.org/A007694
    – Beni Bogosel
    Apr 23 '12 at 12:24








  • 2




    Use the formula for the totient function in terms of the prime factors of n.
    – Dayo Adeyemi
    Apr 23 '12 at 12:32










  • @dayo Adeyemi: I do this and find all the prime factors must be consecutative, therefore can only be $2$ or $3$?
    – Freeman
    Apr 23 '12 at 12:35






  • 1




    @LHS think about it. Can $n$ be prime? or Can $n$ be odd?
    – Kirthi Raman
    Apr 23 '12 at 12:42










  • @Kv Raman: n can't be prime, unless it equals the totient function, however I'm assuming it can't be odd either?
    – Freeman
    Apr 23 '12 at 12:47
















9














Where $phi(n)$ is the Euler phi function, how do you find all $n$ such that $phi(n)|n$?










share|cite|improve this question


















  • 4




    mathforum.org/kb/… and oeis.org/A007694
    – Beni Bogosel
    Apr 23 '12 at 12:24








  • 2




    Use the formula for the totient function in terms of the prime factors of n.
    – Dayo Adeyemi
    Apr 23 '12 at 12:32










  • @dayo Adeyemi: I do this and find all the prime factors must be consecutative, therefore can only be $2$ or $3$?
    – Freeman
    Apr 23 '12 at 12:35






  • 1




    @LHS think about it. Can $n$ be prime? or Can $n$ be odd?
    – Kirthi Raman
    Apr 23 '12 at 12:42










  • @Kv Raman: n can't be prime, unless it equals the totient function, however I'm assuming it can't be odd either?
    – Freeman
    Apr 23 '12 at 12:47














9












9








9


5





Where $phi(n)$ is the Euler phi function, how do you find all $n$ such that $phi(n)|n$?










share|cite|improve this question













Where $phi(n)$ is the Euler phi function, how do you find all $n$ such that $phi(n)|n$?







elementary-number-theory






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Apr 23 '12 at 12:22









Freeman

88082163




88082163








  • 4




    mathforum.org/kb/… and oeis.org/A007694
    – Beni Bogosel
    Apr 23 '12 at 12:24








  • 2




    Use the formula for the totient function in terms of the prime factors of n.
    – Dayo Adeyemi
    Apr 23 '12 at 12:32










  • @dayo Adeyemi: I do this and find all the prime factors must be consecutative, therefore can only be $2$ or $3$?
    – Freeman
    Apr 23 '12 at 12:35






  • 1




    @LHS think about it. Can $n$ be prime? or Can $n$ be odd?
    – Kirthi Raman
    Apr 23 '12 at 12:42










  • @Kv Raman: n can't be prime, unless it equals the totient function, however I'm assuming it can't be odd either?
    – Freeman
    Apr 23 '12 at 12:47














  • 4




    mathforum.org/kb/… and oeis.org/A007694
    – Beni Bogosel
    Apr 23 '12 at 12:24








  • 2




    Use the formula for the totient function in terms of the prime factors of n.
    – Dayo Adeyemi
    Apr 23 '12 at 12:32










  • @dayo Adeyemi: I do this and find all the prime factors must be consecutative, therefore can only be $2$ or $3$?
    – Freeman
    Apr 23 '12 at 12:35






  • 1




    @LHS think about it. Can $n$ be prime? or Can $n$ be odd?
    – Kirthi Raman
    Apr 23 '12 at 12:42










  • @Kv Raman: n can't be prime, unless it equals the totient function, however I'm assuming it can't be odd either?
    – Freeman
    Apr 23 '12 at 12:47








4




4




mathforum.org/kb/… and oeis.org/A007694
– Beni Bogosel
Apr 23 '12 at 12:24






mathforum.org/kb/… and oeis.org/A007694
– Beni Bogosel
Apr 23 '12 at 12:24






2




2




Use the formula for the totient function in terms of the prime factors of n.
– Dayo Adeyemi
Apr 23 '12 at 12:32




Use the formula for the totient function in terms of the prime factors of n.
– Dayo Adeyemi
Apr 23 '12 at 12:32












@dayo Adeyemi: I do this and find all the prime factors must be consecutative, therefore can only be $2$ or $3$?
– Freeman
Apr 23 '12 at 12:35




@dayo Adeyemi: I do this and find all the prime factors must be consecutative, therefore can only be $2$ or $3$?
– Freeman
Apr 23 '12 at 12:35




1




1




@LHS think about it. Can $n$ be prime? or Can $n$ be odd?
– Kirthi Raman
Apr 23 '12 at 12:42




@LHS think about it. Can $n$ be prime? or Can $n$ be odd?
– Kirthi Raman
Apr 23 '12 at 12:42












@Kv Raman: n can't be prime, unless it equals the totient function, however I'm assuming it can't be odd either?
– Freeman
Apr 23 '12 at 12:47




@Kv Raman: n can't be prime, unless it equals the totient function, however I'm assuming it can't be odd either?
– Freeman
Apr 23 '12 at 12:47










2 Answers
2






active

oldest

votes


















19














Assume that the prime factorization of $n$ is



$$n = p_1^{a_1} ldots p_k^{a_k}$$



Then the formula for the totient function gives



$$varphi(n) = (p_1 - 1)p_1^{a_1-1}ldots (p_k - 1)p_k^{a_k-1}.$$



If $n>2$, this is always an even number, so $p_1=2$ must appear as a factor. We next observe that $n$ cannot have two odd prime factors. If $a_2>0$ and $a_3>0$, then both $p_2-1$ and $p_3-1$ are even, so $2^{a_1+1}mid varphi(n)$, which is a contradiction.



So $n=2^{a_1}p^{a_2}$ for some prime $p>2$. Here $p-1midvarphi(n)mid n$, so $p-1$
must be a power of two, say $p-1=2^ell$. Then $2^{a_1-1+ell}midvarphi(n)$, so we must have $ell=1$ and $p=3$.



In the end we can verify that $n=2^a3^b$, with $a>0$, $bge0$ is a solution.






share|cite|improve this answer























  • This is a very helpful answer, thanks so much! I understand this concept much better now
    – Freeman
    Apr 23 '12 at 13:29










  • I feel a bit bad about this. This was meant to address the point left open in m.k.'s answer. But while I was typing, that was deleted. I guess there is a lesson to be learned here?
    – Jyrki Lahtonen
    Apr 23 '12 at 13:35










  • Ah. Well I'm very grateful to m.k. As well. Hope they read this!
    – Freeman
    Apr 23 '12 at 14:03






  • 2




    @LHS There are at least a couple prior questions on this topic, so you might find some other prior answers also of interest. Please link them into this question if you find them.
    – Bill Dubuque
    Apr 23 '12 at 19:40



















0














Quasi-brute-force approach using Maple :



with(numtheory):
for n from 1 to 100 do
if n mod phi(n) = 0 then
print(n);
end if;
end do;





share|cite|improve this answer





















    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%2f135756%2fhow-do-you-find-all-n-such-that-phinn%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









    19














    Assume that the prime factorization of $n$ is



    $$n = p_1^{a_1} ldots p_k^{a_k}$$



    Then the formula for the totient function gives



    $$varphi(n) = (p_1 - 1)p_1^{a_1-1}ldots (p_k - 1)p_k^{a_k-1}.$$



    If $n>2$, this is always an even number, so $p_1=2$ must appear as a factor. We next observe that $n$ cannot have two odd prime factors. If $a_2>0$ and $a_3>0$, then both $p_2-1$ and $p_3-1$ are even, so $2^{a_1+1}mid varphi(n)$, which is a contradiction.



    So $n=2^{a_1}p^{a_2}$ for some prime $p>2$. Here $p-1midvarphi(n)mid n$, so $p-1$
    must be a power of two, say $p-1=2^ell$. Then $2^{a_1-1+ell}midvarphi(n)$, so we must have $ell=1$ and $p=3$.



    In the end we can verify that $n=2^a3^b$, with $a>0$, $bge0$ is a solution.






    share|cite|improve this answer























    • This is a very helpful answer, thanks so much! I understand this concept much better now
      – Freeman
      Apr 23 '12 at 13:29










    • I feel a bit bad about this. This was meant to address the point left open in m.k.'s answer. But while I was typing, that was deleted. I guess there is a lesson to be learned here?
      – Jyrki Lahtonen
      Apr 23 '12 at 13:35










    • Ah. Well I'm very grateful to m.k. As well. Hope they read this!
      – Freeman
      Apr 23 '12 at 14:03






    • 2




      @LHS There are at least a couple prior questions on this topic, so you might find some other prior answers also of interest. Please link them into this question if you find them.
      – Bill Dubuque
      Apr 23 '12 at 19:40
















    19














    Assume that the prime factorization of $n$ is



    $$n = p_1^{a_1} ldots p_k^{a_k}$$



    Then the formula for the totient function gives



    $$varphi(n) = (p_1 - 1)p_1^{a_1-1}ldots (p_k - 1)p_k^{a_k-1}.$$



    If $n>2$, this is always an even number, so $p_1=2$ must appear as a factor. We next observe that $n$ cannot have two odd prime factors. If $a_2>0$ and $a_3>0$, then both $p_2-1$ and $p_3-1$ are even, so $2^{a_1+1}mid varphi(n)$, which is a contradiction.



    So $n=2^{a_1}p^{a_2}$ for some prime $p>2$. Here $p-1midvarphi(n)mid n$, so $p-1$
    must be a power of two, say $p-1=2^ell$. Then $2^{a_1-1+ell}midvarphi(n)$, so we must have $ell=1$ and $p=3$.



    In the end we can verify that $n=2^a3^b$, with $a>0$, $bge0$ is a solution.






    share|cite|improve this answer























    • This is a very helpful answer, thanks so much! I understand this concept much better now
      – Freeman
      Apr 23 '12 at 13:29










    • I feel a bit bad about this. This was meant to address the point left open in m.k.'s answer. But while I was typing, that was deleted. I guess there is a lesson to be learned here?
      – Jyrki Lahtonen
      Apr 23 '12 at 13:35










    • Ah. Well I'm very grateful to m.k. As well. Hope they read this!
      – Freeman
      Apr 23 '12 at 14:03






    • 2




      @LHS There are at least a couple prior questions on this topic, so you might find some other prior answers also of interest. Please link them into this question if you find them.
      – Bill Dubuque
      Apr 23 '12 at 19:40














    19












    19








    19






    Assume that the prime factorization of $n$ is



    $$n = p_1^{a_1} ldots p_k^{a_k}$$



    Then the formula for the totient function gives



    $$varphi(n) = (p_1 - 1)p_1^{a_1-1}ldots (p_k - 1)p_k^{a_k-1}.$$



    If $n>2$, this is always an even number, so $p_1=2$ must appear as a factor. We next observe that $n$ cannot have two odd prime factors. If $a_2>0$ and $a_3>0$, then both $p_2-1$ and $p_3-1$ are even, so $2^{a_1+1}mid varphi(n)$, which is a contradiction.



    So $n=2^{a_1}p^{a_2}$ for some prime $p>2$. Here $p-1midvarphi(n)mid n$, so $p-1$
    must be a power of two, say $p-1=2^ell$. Then $2^{a_1-1+ell}midvarphi(n)$, so we must have $ell=1$ and $p=3$.



    In the end we can verify that $n=2^a3^b$, with $a>0$, $bge0$ is a solution.






    share|cite|improve this answer














    Assume that the prime factorization of $n$ is



    $$n = p_1^{a_1} ldots p_k^{a_k}$$



    Then the formula for the totient function gives



    $$varphi(n) = (p_1 - 1)p_1^{a_1-1}ldots (p_k - 1)p_k^{a_k-1}.$$



    If $n>2$, this is always an even number, so $p_1=2$ must appear as a factor. We next observe that $n$ cannot have two odd prime factors. If $a_2>0$ and $a_3>0$, then both $p_2-1$ and $p_3-1$ are even, so $2^{a_1+1}mid varphi(n)$, which is a contradiction.



    So $n=2^{a_1}p^{a_2}$ for some prime $p>2$. Here $p-1midvarphi(n)mid n$, so $p-1$
    must be a power of two, say $p-1=2^ell$. Then $2^{a_1-1+ell}midvarphi(n)$, so we must have $ell=1$ and $p=3$.



    In the end we can verify that $n=2^a3^b$, with $a>0$, $bge0$ is a solution.







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    answered Apr 23 '12 at 13:17


























    community wiki





    Jyrki Lahtonen













    • This is a very helpful answer, thanks so much! I understand this concept much better now
      – Freeman
      Apr 23 '12 at 13:29










    • I feel a bit bad about this. This was meant to address the point left open in m.k.'s answer. But while I was typing, that was deleted. I guess there is a lesson to be learned here?
      – Jyrki Lahtonen
      Apr 23 '12 at 13:35










    • Ah. Well I'm very grateful to m.k. As well. Hope they read this!
      – Freeman
      Apr 23 '12 at 14:03






    • 2




      @LHS There are at least a couple prior questions on this topic, so you might find some other prior answers also of interest. Please link them into this question if you find them.
      – Bill Dubuque
      Apr 23 '12 at 19:40


















    • This is a very helpful answer, thanks so much! I understand this concept much better now
      – Freeman
      Apr 23 '12 at 13:29










    • I feel a bit bad about this. This was meant to address the point left open in m.k.'s answer. But while I was typing, that was deleted. I guess there is a lesson to be learned here?
      – Jyrki Lahtonen
      Apr 23 '12 at 13:35










    • Ah. Well I'm very grateful to m.k. As well. Hope they read this!
      – Freeman
      Apr 23 '12 at 14:03






    • 2




      @LHS There are at least a couple prior questions on this topic, so you might find some other prior answers also of interest. Please link them into this question if you find them.
      – Bill Dubuque
      Apr 23 '12 at 19:40
















    This is a very helpful answer, thanks so much! I understand this concept much better now
    – Freeman
    Apr 23 '12 at 13:29




    This is a very helpful answer, thanks so much! I understand this concept much better now
    – Freeman
    Apr 23 '12 at 13:29












    I feel a bit bad about this. This was meant to address the point left open in m.k.'s answer. But while I was typing, that was deleted. I guess there is a lesson to be learned here?
    – Jyrki Lahtonen
    Apr 23 '12 at 13:35




    I feel a bit bad about this. This was meant to address the point left open in m.k.'s answer. But while I was typing, that was deleted. I guess there is a lesson to be learned here?
    – Jyrki Lahtonen
    Apr 23 '12 at 13:35












    Ah. Well I'm very grateful to m.k. As well. Hope they read this!
    – Freeman
    Apr 23 '12 at 14:03




    Ah. Well I'm very grateful to m.k. As well. Hope they read this!
    – Freeman
    Apr 23 '12 at 14:03




    2




    2




    @LHS There are at least a couple prior questions on this topic, so you might find some other prior answers also of interest. Please link them into this question if you find them.
    – Bill Dubuque
    Apr 23 '12 at 19:40




    @LHS There are at least a couple prior questions on this topic, so you might find some other prior answers also of interest. Please link them into this question if you find them.
    – Bill Dubuque
    Apr 23 '12 at 19:40











    0














    Quasi-brute-force approach using Maple :



    with(numtheory):
    for n from 1 to 100 do
    if n mod phi(n) = 0 then
    print(n);
    end if;
    end do;





    share|cite|improve this answer


























      0














      Quasi-brute-force approach using Maple :



      with(numtheory):
      for n from 1 to 100 do
      if n mod phi(n) = 0 then
      print(n);
      end if;
      end do;





      share|cite|improve this answer
























        0












        0








        0






        Quasi-brute-force approach using Maple :



        with(numtheory):
        for n from 1 to 100 do
        if n mod phi(n) = 0 then
        print(n);
        end if;
        end do;





        share|cite|improve this answer












        Quasi-brute-force approach using Maple :



        with(numtheory):
        for n from 1 to 100 do
        if n mod phi(n) = 0 then
        print(n);
        end if;
        end do;






        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Apr 23 '12 at 12:59









        Peđa Terzić

        7,89022570




        7,89022570






























            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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.


            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%2f135756%2fhow-do-you-find-all-n-such-that-phinn%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

            Ellipse (mathématiques)

            Quarter-circle Tiles

            Mont Emei