Prove the divisibility of $R^k_npm 1$ by 4











up vote
1
down vote

favorite












The question is:




Prove that:



For $n>1, R_n^k-1$ is divisible by $4$ if $k$ is even. If $k$ is odd, then $R_n^k+1$ is divisible by $4$ where $R_n$ is the rep-unit of length $n$ i.e. $R_3 = 111 , R_5 = 11111, cdots$.




My Try:




  • First we try to find $a$ such that $R_nequiv a pmod 4$.


Notice that we can express these integers as $R_n = frac{10^n-1}{9}$. Now:
$$frac{10^n-1}{9} equiv a pmod 4$$
$$10^n-1 equiv 9a pmod 4 to 10^n-1 equiv a pmod 4$$
But $10^n$ is divisible by $4$ for any $n>1$. Hence:
$$0-1 equiv a pmod 4$$
Implying:




$$a equiv -1 pmod 4$$





  • The second step is trivial. If $k$ is odd, then $(-1)^k +1 = -1 + 1 = 0 pmod 4$, else if $k$ is even, then $(-1)^k -1 = 1-1 = 0 pmod 4$


Any ideas or notes on the prove?



Is there simpler way to prove so?










share|cite|improve this question


















  • 1




    To prove $R_n equiv -1 pmod 4$, you can use the fact that $R_n = 100 * alpha + 11 $ which can save you a few lines. The second step is really straightforward and can't be improved IMHO
    – F.Carette
    Nov 22 at 13:06










  • @F.Carette, Thanks.
    – Maged Saeed
    Nov 22 at 13:07










  • @F.Carette It's improvable by improvng the proposition to: $ 4mid R^k - (-1)^k. $ Then $!bmod 4!:, Requiv -1,Rightarrow, R^kequiv (-1)^k,$ follows immediately by the Congruence Power Rule.
    – Bill Dubuque
    Nov 22 at 15:28

















up vote
1
down vote

favorite












The question is:




Prove that:



For $n>1, R_n^k-1$ is divisible by $4$ if $k$ is even. If $k$ is odd, then $R_n^k+1$ is divisible by $4$ where $R_n$ is the rep-unit of length $n$ i.e. $R_3 = 111 , R_5 = 11111, cdots$.




My Try:




  • First we try to find $a$ such that $R_nequiv a pmod 4$.


Notice that we can express these integers as $R_n = frac{10^n-1}{9}$. Now:
$$frac{10^n-1}{9} equiv a pmod 4$$
$$10^n-1 equiv 9a pmod 4 to 10^n-1 equiv a pmod 4$$
But $10^n$ is divisible by $4$ for any $n>1$. Hence:
$$0-1 equiv a pmod 4$$
Implying:




$$a equiv -1 pmod 4$$





  • The second step is trivial. If $k$ is odd, then $(-1)^k +1 = -1 + 1 = 0 pmod 4$, else if $k$ is even, then $(-1)^k -1 = 1-1 = 0 pmod 4$


Any ideas or notes on the prove?



Is there simpler way to prove so?










share|cite|improve this question


















  • 1




    To prove $R_n equiv -1 pmod 4$, you can use the fact that $R_n = 100 * alpha + 11 $ which can save you a few lines. The second step is really straightforward and can't be improved IMHO
    – F.Carette
    Nov 22 at 13:06










  • @F.Carette, Thanks.
    – Maged Saeed
    Nov 22 at 13:07










  • @F.Carette It's improvable by improvng the proposition to: $ 4mid R^k - (-1)^k. $ Then $!bmod 4!:, Requiv -1,Rightarrow, R^kequiv (-1)^k,$ follows immediately by the Congruence Power Rule.
    – Bill Dubuque
    Nov 22 at 15:28















up vote
1
down vote

favorite









up vote
1
down vote

favorite











The question is:




Prove that:



For $n>1, R_n^k-1$ is divisible by $4$ if $k$ is even. If $k$ is odd, then $R_n^k+1$ is divisible by $4$ where $R_n$ is the rep-unit of length $n$ i.e. $R_3 = 111 , R_5 = 11111, cdots$.




My Try:




  • First we try to find $a$ such that $R_nequiv a pmod 4$.


Notice that we can express these integers as $R_n = frac{10^n-1}{9}$. Now:
$$frac{10^n-1}{9} equiv a pmod 4$$
$$10^n-1 equiv 9a pmod 4 to 10^n-1 equiv a pmod 4$$
But $10^n$ is divisible by $4$ for any $n>1$. Hence:
$$0-1 equiv a pmod 4$$
Implying:




$$a equiv -1 pmod 4$$





  • The second step is trivial. If $k$ is odd, then $(-1)^k +1 = -1 + 1 = 0 pmod 4$, else if $k$ is even, then $(-1)^k -1 = 1-1 = 0 pmod 4$


Any ideas or notes on the prove?



Is there simpler way to prove so?










share|cite|improve this question













The question is:




Prove that:



For $n>1, R_n^k-1$ is divisible by $4$ if $k$ is even. If $k$ is odd, then $R_n^k+1$ is divisible by $4$ where $R_n$ is the rep-unit of length $n$ i.e. $R_3 = 111 , R_5 = 11111, cdots$.




My Try:




  • First we try to find $a$ such that $R_nequiv a pmod 4$.


Notice that we can express these integers as $R_n = frac{10^n-1}{9}$. Now:
$$frac{10^n-1}{9} equiv a pmod 4$$
$$10^n-1 equiv 9a pmod 4 to 10^n-1 equiv a pmod 4$$
But $10^n$ is divisible by $4$ for any $n>1$. Hence:
$$0-1 equiv a pmod 4$$
Implying:




$$a equiv -1 pmod 4$$





  • The second step is trivial. If $k$ is odd, then $(-1)^k +1 = -1 + 1 = 0 pmod 4$, else if $k$ is even, then $(-1)^k -1 = 1-1 = 0 pmod 4$


Any ideas or notes on the prove?



Is there simpler way to prove so?







elementary-number-theory modular-arithmetic divisibility






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 22 at 12:57









Maged Saeed

725316




725316








  • 1




    To prove $R_n equiv -1 pmod 4$, you can use the fact that $R_n = 100 * alpha + 11 $ which can save you a few lines. The second step is really straightforward and can't be improved IMHO
    – F.Carette
    Nov 22 at 13:06










  • @F.Carette, Thanks.
    – Maged Saeed
    Nov 22 at 13:07










  • @F.Carette It's improvable by improvng the proposition to: $ 4mid R^k - (-1)^k. $ Then $!bmod 4!:, Requiv -1,Rightarrow, R^kequiv (-1)^k,$ follows immediately by the Congruence Power Rule.
    – Bill Dubuque
    Nov 22 at 15:28
















  • 1




    To prove $R_n equiv -1 pmod 4$, you can use the fact that $R_n = 100 * alpha + 11 $ which can save you a few lines. The second step is really straightforward and can't be improved IMHO
    – F.Carette
    Nov 22 at 13:06










  • @F.Carette, Thanks.
    – Maged Saeed
    Nov 22 at 13:07










  • @F.Carette It's improvable by improvng the proposition to: $ 4mid R^k - (-1)^k. $ Then $!bmod 4!:, Requiv -1,Rightarrow, R^kequiv (-1)^k,$ follows immediately by the Congruence Power Rule.
    – Bill Dubuque
    Nov 22 at 15:28










1




1




To prove $R_n equiv -1 pmod 4$, you can use the fact that $R_n = 100 * alpha + 11 $ which can save you a few lines. The second step is really straightforward and can't be improved IMHO
– F.Carette
Nov 22 at 13:06




To prove $R_n equiv -1 pmod 4$, you can use the fact that $R_n = 100 * alpha + 11 $ which can save you a few lines. The second step is really straightforward and can't be improved IMHO
– F.Carette
Nov 22 at 13:06












@F.Carette, Thanks.
– Maged Saeed
Nov 22 at 13:07




@F.Carette, Thanks.
– Maged Saeed
Nov 22 at 13:07












@F.Carette It's improvable by improvng the proposition to: $ 4mid R^k - (-1)^k. $ Then $!bmod 4!:, Requiv -1,Rightarrow, R^kequiv (-1)^k,$ follows immediately by the Congruence Power Rule.
– Bill Dubuque
Nov 22 at 15:28






@F.Carette It's improvable by improvng the proposition to: $ 4mid R^k - (-1)^k. $ Then $!bmod 4!:, Requiv -1,Rightarrow, R^kequiv (-1)^k,$ follows immediately by the Congruence Power Rule.
– Bill Dubuque
Nov 22 at 15:28












1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Your proof is correct. As for "simpler ways", we may use modular fractions. If $,gcd(b,m)=1,$ then $,b^{-1}$ exists $!bmod m,$ and $,a/b := ab^{-1}$ is a unique solution of $,bxequiv apmod{!m},,$ and it satisfies



$!bmod m!:, begin{align}A&equiv a\ B&equiv bend{align} Rightarrow dfrac{A}Bequiv dfrac{a}b equiv dfrac{abmod m}{bbmod m}, {bf if} gcd(b,m)=1; $ thus



$bmod color{#c00}4!:, R_n := dfrac{(2i)^{large n}-1}{4j+1}, =, dfrac{color{#c00}4i^2 (2i)^{large n-2}-1}{color{#c00}4j+1},equiv, dfrac{-1}1 $ for all $,nge 2$



therefore $ R_n^{large k},equiv, (-1)^{large k} $ by Congruence Power Rule. $ $ OP has $,i = 5,, j = 2$



Beware $ $ Modular fraction arithmetic is well-defined only for fractions with denominator coprime to the modulus. See here for further discussion.






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: 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%2f3009096%2fprove-the-divisibility-of-rk-n-pm-1-by-4%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    Your proof is correct. As for "simpler ways", we may use modular fractions. If $,gcd(b,m)=1,$ then $,b^{-1}$ exists $!bmod m,$ and $,a/b := ab^{-1}$ is a unique solution of $,bxequiv apmod{!m},,$ and it satisfies



    $!bmod m!:, begin{align}A&equiv a\ B&equiv bend{align} Rightarrow dfrac{A}Bequiv dfrac{a}b equiv dfrac{abmod m}{bbmod m}, {bf if} gcd(b,m)=1; $ thus



    $bmod color{#c00}4!:, R_n := dfrac{(2i)^{large n}-1}{4j+1}, =, dfrac{color{#c00}4i^2 (2i)^{large n-2}-1}{color{#c00}4j+1},equiv, dfrac{-1}1 $ for all $,nge 2$



    therefore $ R_n^{large k},equiv, (-1)^{large k} $ by Congruence Power Rule. $ $ OP has $,i = 5,, j = 2$



    Beware $ $ Modular fraction arithmetic is well-defined only for fractions with denominator coprime to the modulus. See here for further discussion.






    share|cite|improve this answer



























      up vote
      1
      down vote



      accepted










      Your proof is correct. As for "simpler ways", we may use modular fractions. If $,gcd(b,m)=1,$ then $,b^{-1}$ exists $!bmod m,$ and $,a/b := ab^{-1}$ is a unique solution of $,bxequiv apmod{!m},,$ and it satisfies



      $!bmod m!:, begin{align}A&equiv a\ B&equiv bend{align} Rightarrow dfrac{A}Bequiv dfrac{a}b equiv dfrac{abmod m}{bbmod m}, {bf if} gcd(b,m)=1; $ thus



      $bmod color{#c00}4!:, R_n := dfrac{(2i)^{large n}-1}{4j+1}, =, dfrac{color{#c00}4i^2 (2i)^{large n-2}-1}{color{#c00}4j+1},equiv, dfrac{-1}1 $ for all $,nge 2$



      therefore $ R_n^{large k},equiv, (-1)^{large k} $ by Congruence Power Rule. $ $ OP has $,i = 5,, j = 2$



      Beware $ $ Modular fraction arithmetic is well-defined only for fractions with denominator coprime to the modulus. See here for further discussion.






      share|cite|improve this answer

























        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        Your proof is correct. As for "simpler ways", we may use modular fractions. If $,gcd(b,m)=1,$ then $,b^{-1}$ exists $!bmod m,$ and $,a/b := ab^{-1}$ is a unique solution of $,bxequiv apmod{!m},,$ and it satisfies



        $!bmod m!:, begin{align}A&equiv a\ B&equiv bend{align} Rightarrow dfrac{A}Bequiv dfrac{a}b equiv dfrac{abmod m}{bbmod m}, {bf if} gcd(b,m)=1; $ thus



        $bmod color{#c00}4!:, R_n := dfrac{(2i)^{large n}-1}{4j+1}, =, dfrac{color{#c00}4i^2 (2i)^{large n-2}-1}{color{#c00}4j+1},equiv, dfrac{-1}1 $ for all $,nge 2$



        therefore $ R_n^{large k},equiv, (-1)^{large k} $ by Congruence Power Rule. $ $ OP has $,i = 5,, j = 2$



        Beware $ $ Modular fraction arithmetic is well-defined only for fractions with denominator coprime to the modulus. See here for further discussion.






        share|cite|improve this answer














        Your proof is correct. As for "simpler ways", we may use modular fractions. If $,gcd(b,m)=1,$ then $,b^{-1}$ exists $!bmod m,$ and $,a/b := ab^{-1}$ is a unique solution of $,bxequiv apmod{!m},,$ and it satisfies



        $!bmod m!:, begin{align}A&equiv a\ B&equiv bend{align} Rightarrow dfrac{A}Bequiv dfrac{a}b equiv dfrac{abmod m}{bbmod m}, {bf if} gcd(b,m)=1; $ thus



        $bmod color{#c00}4!:, R_n := dfrac{(2i)^{large n}-1}{4j+1}, =, dfrac{color{#c00}4i^2 (2i)^{large n-2}-1}{color{#c00}4j+1},equiv, dfrac{-1}1 $ for all $,nge 2$



        therefore $ R_n^{large k},equiv, (-1)^{large k} $ by Congruence Power Rule. $ $ OP has $,i = 5,, j = 2$



        Beware $ $ Modular fraction arithmetic is well-defined only for fractions with denominator coprime to the modulus. See here for further discussion.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Nov 22 at 16:34

























        answered Nov 22 at 16:18









        Bill Dubuque

        207k29189625




        207k29189625






























            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%2f3009096%2fprove-the-divisibility-of-rk-n-pm-1-by-4%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