Find n such that $2^n equiv xmod 3^k$

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











up vote
2
down vote

favorite
1












It looks like for every $k ge 1$ and x is not a multiple of 3, $2^n equiv xmod 3^k$ as a unique solution (modulo $2 times 3^k-1$).



How to prove it?
How to find such n given k and x?



Thanks.







share|cite|improve this question

















  • 3




    That is called $2$ being a primitive root $mod 3^k$ en.wikipedia.org/wiki/Primitive_root_modulo_n
    – fleablood
    Aug 3 at 11:52














up vote
2
down vote

favorite
1












It looks like for every $k ge 1$ and x is not a multiple of 3, $2^n equiv xmod 3^k$ as a unique solution (modulo $2 times 3^k-1$).



How to prove it?
How to find such n given k and x?



Thanks.







share|cite|improve this question

















  • 3




    That is called $2$ being a primitive root $mod 3^k$ en.wikipedia.org/wiki/Primitive_root_modulo_n
    – fleablood
    Aug 3 at 11:52












up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





It looks like for every $k ge 1$ and x is not a multiple of 3, $2^n equiv xmod 3^k$ as a unique solution (modulo $2 times 3^k-1$).



How to prove it?
How to find such n given k and x?



Thanks.







share|cite|improve this question













It looks like for every $k ge 1$ and x is not a multiple of 3, $2^n equiv xmod 3^k$ as a unique solution (modulo $2 times 3^k-1$).



How to prove it?
How to find such n given k and x?



Thanks.









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Aug 3 at 11:24









pointguard0

591317




591317









asked Aug 3 at 11:11









Damien

1195




1195







  • 3




    That is called $2$ being a primitive root $mod 3^k$ en.wikipedia.org/wiki/Primitive_root_modulo_n
    – fleablood
    Aug 3 at 11:52












  • 3




    That is called $2$ being a primitive root $mod 3^k$ en.wikipedia.org/wiki/Primitive_root_modulo_n
    – fleablood
    Aug 3 at 11:52







3




3




That is called $2$ being a primitive root $mod 3^k$ en.wikipedia.org/wiki/Primitive_root_modulo_n
– fleablood
Aug 3 at 11:52




That is called $2$ being a primitive root $mod 3^k$ en.wikipedia.org/wiki/Primitive_root_modulo_n
– fleablood
Aug 3 at 11:52










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










You need to show that $2^2*3^k-1ne1pmod3^k+1$. That follows by induction by cubing $1+3^k-1+m*3^kpmod3^k+1$.

To find $n$, write $x$ in base $3$. First, $n=0$ or $1$ depending on $xpmod3$. Then add $0,2$ or $4$ to $n$ so that $2^n=xpmod 9$; add $0,6$ or $12$ to get it correct mod $27$, and so on.






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',
    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%2f2870961%2ffind-n-such-that-2n-equiv-x-mod-3k%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
    2
    down vote



    accepted










    You need to show that $2^2*3^k-1ne1pmod3^k+1$. That follows by induction by cubing $1+3^k-1+m*3^kpmod3^k+1$.

    To find $n$, write $x$ in base $3$. First, $n=0$ or $1$ depending on $xpmod3$. Then add $0,2$ or $4$ to $n$ so that $2^n=xpmod 9$; add $0,6$ or $12$ to get it correct mod $27$, and so on.






    share|cite|improve this answer

























      up vote
      2
      down vote



      accepted










      You need to show that $2^2*3^k-1ne1pmod3^k+1$. That follows by induction by cubing $1+3^k-1+m*3^kpmod3^k+1$.

      To find $n$, write $x$ in base $3$. First, $n=0$ or $1$ depending on $xpmod3$. Then add $0,2$ or $4$ to $n$ so that $2^n=xpmod 9$; add $0,6$ or $12$ to get it correct mod $27$, and so on.






      share|cite|improve this answer























        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        You need to show that $2^2*3^k-1ne1pmod3^k+1$. That follows by induction by cubing $1+3^k-1+m*3^kpmod3^k+1$.

        To find $n$, write $x$ in base $3$. First, $n=0$ or $1$ depending on $xpmod3$. Then add $0,2$ or $4$ to $n$ so that $2^n=xpmod 9$; add $0,6$ or $12$ to get it correct mod $27$, and so on.






        share|cite|improve this answer













        You need to show that $2^2*3^k-1ne1pmod3^k+1$. That follows by induction by cubing $1+3^k-1+m*3^kpmod3^k+1$.

        To find $n$, write $x$ in base $3$. First, $n=0$ or $1$ depending on $xpmod3$. Then add $0,2$ or $4$ to $n$ so that $2^n=xpmod 9$; add $0,6$ or $12$ to get it correct mod $27$, and so on.







        share|cite|improve this answer













        share|cite|improve this answer



        share|cite|improve this answer











        answered Aug 3 at 12:06









        Empy2

        31.7k12059




        31.7k12059






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2870961%2ffind-n-such-that-2n-equiv-x-mod-3k%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What is the equation of a 3D cone with generalised tilt?

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?