Representation of an integer / Euclidean algorithm












3












$begingroup$


Let $r in mathbb{N}$ be a natural number. Let
$$L geq 2(r-1)²$$
A paper (on quantum information theory, I'm not an expert in number theory or so...) I'm recently reading now says



"One can easily check that $L$ can be represented as
$$L = a(r-1)+br$$
where $a, b in mathbb{Z}$ are positive integers and
$$K = a + b$$
is even."



My first attempt was of course to apply something like the euclidean algorithm, which gives us
$$L = k(r-1)+m$$
where $k, m$ are positive integers, $m<r-1$ (I tried to apply euclidean algorithm for $r$ instead of $r-1$ at first, but this seems to be more useful...)



As we have
$$L = k(r-1) + m geq 2(r-1)²$$
with $m leq r-2$, we know
$$k+1-m-2 geq 2r(r-1) -(r-2)-2 geq 2r² -3r -1 geq (r-1)²$$
for all $rgeq 2$. (The case $r=1$ is not interesting.)



Therefore we can write
$$L = (k+1)(r-1)+m-r+1 = (k+1-m-2)(r-1)+(m+1)r$$
where now $(k+1-m-2), (m+1)$ are positive integers. But their sum equals
$$(k+1-m-2)+(m+1)=k$$
which of course does not have to be even.



Can somebody give me a hint how to manipulate this way of writing
$$L=a(r-1)+br$$
where $a+b$ is even?



This whole thing is a little weird, if you consider e.g. $r=5, L=33geq 32$, you could write
$$33=5r+2(r-1)$$
where $5+2$ is not even, but you also can write
$$33=r+7(r-1)$$
where $1+7$ is even (I don't know if an expert in stuff like this would consider this as weird, but I do...)



Thanks for any help :)










share|cite|improve this question









$endgroup$

















    3












    $begingroup$


    Let $r in mathbb{N}$ be a natural number. Let
    $$L geq 2(r-1)²$$
    A paper (on quantum information theory, I'm not an expert in number theory or so...) I'm recently reading now says



    "One can easily check that $L$ can be represented as
    $$L = a(r-1)+br$$
    where $a, b in mathbb{Z}$ are positive integers and
    $$K = a + b$$
    is even."



    My first attempt was of course to apply something like the euclidean algorithm, which gives us
    $$L = k(r-1)+m$$
    where $k, m$ are positive integers, $m<r-1$ (I tried to apply euclidean algorithm for $r$ instead of $r-1$ at first, but this seems to be more useful...)



    As we have
    $$L = k(r-1) + m geq 2(r-1)²$$
    with $m leq r-2$, we know
    $$k+1-m-2 geq 2r(r-1) -(r-2)-2 geq 2r² -3r -1 geq (r-1)²$$
    for all $rgeq 2$. (The case $r=1$ is not interesting.)



    Therefore we can write
    $$L = (k+1)(r-1)+m-r+1 = (k+1-m-2)(r-1)+(m+1)r$$
    where now $(k+1-m-2), (m+1)$ are positive integers. But their sum equals
    $$(k+1-m-2)+(m+1)=k$$
    which of course does not have to be even.



    Can somebody give me a hint how to manipulate this way of writing
    $$L=a(r-1)+br$$
    where $a+b$ is even?



    This whole thing is a little weird, if you consider e.g. $r=5, L=33geq 32$, you could write
    $$33=5r+2(r-1)$$
    where $5+2$ is not even, but you also can write
    $$33=r+7(r-1)$$
    where $1+7$ is even (I don't know if an expert in stuff like this would consider this as weird, but I do...)



    Thanks for any help :)










    share|cite|improve this question









    $endgroup$















      3












      3








      3





      $begingroup$


      Let $r in mathbb{N}$ be a natural number. Let
      $$L geq 2(r-1)²$$
      A paper (on quantum information theory, I'm not an expert in number theory or so...) I'm recently reading now says



      "One can easily check that $L$ can be represented as
      $$L = a(r-1)+br$$
      where $a, b in mathbb{Z}$ are positive integers and
      $$K = a + b$$
      is even."



      My first attempt was of course to apply something like the euclidean algorithm, which gives us
      $$L = k(r-1)+m$$
      where $k, m$ are positive integers, $m<r-1$ (I tried to apply euclidean algorithm for $r$ instead of $r-1$ at first, but this seems to be more useful...)



      As we have
      $$L = k(r-1) + m geq 2(r-1)²$$
      with $m leq r-2$, we know
      $$k+1-m-2 geq 2r(r-1) -(r-2)-2 geq 2r² -3r -1 geq (r-1)²$$
      for all $rgeq 2$. (The case $r=1$ is not interesting.)



      Therefore we can write
      $$L = (k+1)(r-1)+m-r+1 = (k+1-m-2)(r-1)+(m+1)r$$
      where now $(k+1-m-2), (m+1)$ are positive integers. But their sum equals
      $$(k+1-m-2)+(m+1)=k$$
      which of course does not have to be even.



      Can somebody give me a hint how to manipulate this way of writing
      $$L=a(r-1)+br$$
      where $a+b$ is even?



      This whole thing is a little weird, if you consider e.g. $r=5, L=33geq 32$, you could write
      $$33=5r+2(r-1)$$
      where $5+2$ is not even, but you also can write
      $$33=r+7(r-1)$$
      where $1+7$ is even (I don't know if an expert in stuff like this would consider this as weird, but I do...)



      Thanks for any help :)










      share|cite|improve this question









      $endgroup$




      Let $r in mathbb{N}$ be a natural number. Let
      $$L geq 2(r-1)²$$
      A paper (on quantum information theory, I'm not an expert in number theory or so...) I'm recently reading now says



      "One can easily check that $L$ can be represented as
      $$L = a(r-1)+br$$
      where $a, b in mathbb{Z}$ are positive integers and
      $$K = a + b$$
      is even."



      My first attempt was of course to apply something like the euclidean algorithm, which gives us
      $$L = k(r-1)+m$$
      where $k, m$ are positive integers, $m<r-1$ (I tried to apply euclidean algorithm for $r$ instead of $r-1$ at first, but this seems to be more useful...)



      As we have
      $$L = k(r-1) + m geq 2(r-1)²$$
      with $m leq r-2$, we know
      $$k+1-m-2 geq 2r(r-1) -(r-2)-2 geq 2r² -3r -1 geq (r-1)²$$
      for all $rgeq 2$. (The case $r=1$ is not interesting.)



      Therefore we can write
      $$L = (k+1)(r-1)+m-r+1 = (k+1-m-2)(r-1)+(m+1)r$$
      where now $(k+1-m-2), (m+1)$ are positive integers. But their sum equals
      $$(k+1-m-2)+(m+1)=k$$
      which of course does not have to be even.



      Can somebody give me a hint how to manipulate this way of writing
      $$L=a(r-1)+br$$
      where $a+b$ is even?



      This whole thing is a little weird, if you consider e.g. $r=5, L=33geq 32$, you could write
      $$33=5r+2(r-1)$$
      where $5+2$ is not even, but you also can write
      $$33=r+7(r-1)$$
      where $1+7$ is even (I don't know if an expert in stuff like this would consider this as weird, but I do...)



      Thanks for any help :)







      summation integers euclidean-algorithm






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Dec 22 '18 at 23:29









      Fritz HefterFritz Hefter

      264




      264






















          1 Answer
          1






          active

          oldest

          votes


















          0












          $begingroup$

          While I'm not sure how to make the OP's idea work, the following is a solution to the problem he poses.



          First suppose $(r-1) nmid L$. Notice that the condition that $a,b$ exist so that $L = a(r-1) + br$ is equivalent to saying that $a,b$ exist so that $r-1 = frac{L-b}{a + b}$. Choose $b$ so that $L-b = 2k(r-1)$, where $k$ is chosen so that $2k(r-1)$ is the largest multiple of $2(r-1)$ less than or equal to $L$. Then we must have $a + b = 2k$ and that $0 < b leq r-1$. Because $k geq r-1$, it follows that $a > 0$.



          Now suppose $L = m(r-1)$ for some odd number $m$. Then take $b = r-1$ and $a = m-r$.



          Now suppose $L = 2m(r-1)$ for some odd number $m$. Then take $b = 2(r-1)$ and $a = 2(m-r)$.



          That should be all the cases.






          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%2f3049931%2frepresentation-of-an-integer-euclidean-algorithm%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









            0












            $begingroup$

            While I'm not sure how to make the OP's idea work, the following is a solution to the problem he poses.



            First suppose $(r-1) nmid L$. Notice that the condition that $a,b$ exist so that $L = a(r-1) + br$ is equivalent to saying that $a,b$ exist so that $r-1 = frac{L-b}{a + b}$. Choose $b$ so that $L-b = 2k(r-1)$, where $k$ is chosen so that $2k(r-1)$ is the largest multiple of $2(r-1)$ less than or equal to $L$. Then we must have $a + b = 2k$ and that $0 < b leq r-1$. Because $k geq r-1$, it follows that $a > 0$.



            Now suppose $L = m(r-1)$ for some odd number $m$. Then take $b = r-1$ and $a = m-r$.



            Now suppose $L = 2m(r-1)$ for some odd number $m$. Then take $b = 2(r-1)$ and $a = 2(m-r)$.



            That should be all the cases.






            share|cite|improve this answer











            $endgroup$


















              0












              $begingroup$

              While I'm not sure how to make the OP's idea work, the following is a solution to the problem he poses.



              First suppose $(r-1) nmid L$. Notice that the condition that $a,b$ exist so that $L = a(r-1) + br$ is equivalent to saying that $a,b$ exist so that $r-1 = frac{L-b}{a + b}$. Choose $b$ so that $L-b = 2k(r-1)$, where $k$ is chosen so that $2k(r-1)$ is the largest multiple of $2(r-1)$ less than or equal to $L$. Then we must have $a + b = 2k$ and that $0 < b leq r-1$. Because $k geq r-1$, it follows that $a > 0$.



              Now suppose $L = m(r-1)$ for some odd number $m$. Then take $b = r-1$ and $a = m-r$.



              Now suppose $L = 2m(r-1)$ for some odd number $m$. Then take $b = 2(r-1)$ and $a = 2(m-r)$.



              That should be all the cases.






              share|cite|improve this answer











              $endgroup$
















                0












                0








                0





                $begingroup$

                While I'm not sure how to make the OP's idea work, the following is a solution to the problem he poses.



                First suppose $(r-1) nmid L$. Notice that the condition that $a,b$ exist so that $L = a(r-1) + br$ is equivalent to saying that $a,b$ exist so that $r-1 = frac{L-b}{a + b}$. Choose $b$ so that $L-b = 2k(r-1)$, where $k$ is chosen so that $2k(r-1)$ is the largest multiple of $2(r-1)$ less than or equal to $L$. Then we must have $a + b = 2k$ and that $0 < b leq r-1$. Because $k geq r-1$, it follows that $a > 0$.



                Now suppose $L = m(r-1)$ for some odd number $m$. Then take $b = r-1$ and $a = m-r$.



                Now suppose $L = 2m(r-1)$ for some odd number $m$. Then take $b = 2(r-1)$ and $a = 2(m-r)$.



                That should be all the cases.






                share|cite|improve this answer











                $endgroup$



                While I'm not sure how to make the OP's idea work, the following is a solution to the problem he poses.



                First suppose $(r-1) nmid L$. Notice that the condition that $a,b$ exist so that $L = a(r-1) + br$ is equivalent to saying that $a,b$ exist so that $r-1 = frac{L-b}{a + b}$. Choose $b$ so that $L-b = 2k(r-1)$, where $k$ is chosen so that $2k(r-1)$ is the largest multiple of $2(r-1)$ less than or equal to $L$. Then we must have $a + b = 2k$ and that $0 < b leq r-1$. Because $k geq r-1$, it follows that $a > 0$.



                Now suppose $L = m(r-1)$ for some odd number $m$. Then take $b = r-1$ and $a = m-r$.



                Now suppose $L = 2m(r-1)$ for some odd number $m$. Then take $b = 2(r-1)$ and $a = 2(m-r)$.



                That should be all the cases.







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited Dec 23 '18 at 1:29

























                answered Dec 23 '18 at 0:10









                Ashvin SwaminathanAshvin Swaminathan

                1,571520




                1,571520






























                    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%2f3049931%2frepresentation-of-an-integer-euclidean-algorithm%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

                    Mont Emei

                    Province de Neuquén

                    Journaliste