Decimal expansions of rational numbers.











up vote
0
down vote

favorite












One can use modular arithmetic to find the decimal expansion of a rational number. (see 1: https://i.stack.imgur.com/kw4Gk.png).



Using the same method I have run into a couple of problems.




  1. $x = frac{1}{6}$


In this case $m =1$ and $n=6$. Then the remainders are $1, 10 equiv 4, 40 equiv 4, ...$



so therefore $10^2 cdot 1 equiv 10^1 cdot 1 pmod{6}$. Now $10^2-10^1 = 90 = 6 cdot 15$ and so $left(10^2 -10^1right)x = 15$, but doing long division $x = 0.1overline{6}$ and not $x = 0.1overline{15}$. I am not really understanding the final step to determine $x$.





  1. $x = frac{1}{37}$.


In this case $m =1$ and $n =37$. Then the remainders are $1, 10 equiv 10, 100 equiv 26, 260 equiv 1.$ So $10^3 cdot 1 equiv 1 pmod{37}$. Now $10^3 -1 = 999 = 27 cdot 37$. Therefore so $(10^3-1)x =27$, and by method above $x = 0.overline{27}$, but doing long division $x = 0.overline{027}$.



Clearly I am doing something wrong, the method should work for both of these cases. However I am not sure what it is?










share|cite|improve this question


























    up vote
    0
    down vote

    favorite












    One can use modular arithmetic to find the decimal expansion of a rational number. (see 1: https://i.stack.imgur.com/kw4Gk.png).



    Using the same method I have run into a couple of problems.




    1. $x = frac{1}{6}$


    In this case $m =1$ and $n=6$. Then the remainders are $1, 10 equiv 4, 40 equiv 4, ...$



    so therefore $10^2 cdot 1 equiv 10^1 cdot 1 pmod{6}$. Now $10^2-10^1 = 90 = 6 cdot 15$ and so $left(10^2 -10^1right)x = 15$, but doing long division $x = 0.1overline{6}$ and not $x = 0.1overline{15}$. I am not really understanding the final step to determine $x$.





    1. $x = frac{1}{37}$.


    In this case $m =1$ and $n =37$. Then the remainders are $1, 10 equiv 10, 100 equiv 26, 260 equiv 1.$ So $10^3 cdot 1 equiv 1 pmod{37}$. Now $10^3 -1 = 999 = 27 cdot 37$. Therefore so $(10^3-1)x =27$, and by method above $x = 0.overline{27}$, but doing long division $x = 0.overline{027}$.



    Clearly I am doing something wrong, the method should work for both of these cases. However I am not sure what it is?










    share|cite|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      One can use modular arithmetic to find the decimal expansion of a rational number. (see 1: https://i.stack.imgur.com/kw4Gk.png).



      Using the same method I have run into a couple of problems.




      1. $x = frac{1}{6}$


      In this case $m =1$ and $n=6$. Then the remainders are $1, 10 equiv 4, 40 equiv 4, ...$



      so therefore $10^2 cdot 1 equiv 10^1 cdot 1 pmod{6}$. Now $10^2-10^1 = 90 = 6 cdot 15$ and so $left(10^2 -10^1right)x = 15$, but doing long division $x = 0.1overline{6}$ and not $x = 0.1overline{15}$. I am not really understanding the final step to determine $x$.





      1. $x = frac{1}{37}$.


      In this case $m =1$ and $n =37$. Then the remainders are $1, 10 equiv 10, 100 equiv 26, 260 equiv 1.$ So $10^3 cdot 1 equiv 1 pmod{37}$. Now $10^3 -1 = 999 = 27 cdot 37$. Therefore so $(10^3-1)x =27$, and by method above $x = 0.overline{27}$, but doing long division $x = 0.overline{027}$.



      Clearly I am doing something wrong, the method should work for both of these cases. However I am not sure what it is?










      share|cite|improve this question













      One can use modular arithmetic to find the decimal expansion of a rational number. (see 1: https://i.stack.imgur.com/kw4Gk.png).



      Using the same method I have run into a couple of problems.




      1. $x = frac{1}{6}$


      In this case $m =1$ and $n=6$. Then the remainders are $1, 10 equiv 4, 40 equiv 4, ...$



      so therefore $10^2 cdot 1 equiv 10^1 cdot 1 pmod{6}$. Now $10^2-10^1 = 90 = 6 cdot 15$ and so $left(10^2 -10^1right)x = 15$, but doing long division $x = 0.1overline{6}$ and not $x = 0.1overline{15}$. I am not really understanding the final step to determine $x$.





      1. $x = frac{1}{37}$.


      In this case $m =1$ and $n =37$. Then the remainders are $1, 10 equiv 10, 100 equiv 26, 260 equiv 1.$ So $10^3 cdot 1 equiv 1 pmod{37}$. Now $10^3 -1 = 999 = 27 cdot 37$. Therefore so $(10^3-1)x =27$, and by method above $x = 0.overline{27}$, but doing long division $x = 0.overline{027}$.



      Clearly I am doing something wrong, the method should work for both of these cases. However I am not sure what it is?







      modular-arithmetic rational-numbers decimal-expansion






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Nov 3 at 17:10









      xAly

      192




      192






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          For $dfrac {1}{6} dots$



          $begin {align}
          1operatorname {mod} 6 equiv 1 \
          10operatorname {mod} 6 equiv 4 \
          40operatorname {mod} 6 equiv 4 \
          end {align}$



          $4$ is the repeating number, so we say $color red {10^2 - 4} = 96 = 6 cdot 16$, and $(10^2 - 4)x = (16) rightarrow x = dfrac {16}{10^2-4} rightarrow dfrac {16}{96} rightarrow bbox [2px, border: 2px solid black]{x = .1overline{6}}$.



          For $dfrac {1}{37} dots$



          $begin {align}
          1operatorname {mod} 37 equiv 1 \
          10operatorname {mod} 37 equiv 10 \
          100operatorname {mod} 37 equiv 26 \
          260operatorname {mod} 37 equiv 1 \
          end {align}$



          $1$ is the repeating number, so we say $10^3 - 1 = 999 = 37 cdot 27$, and $color red {(10^3 - 1)}x = 27 rightarrow x = dfrac {27}{10^3-1} rightarrow x = dfrac {27}{999} rightarrow bbox [2px, border: 2px solid black] {x = overline{.027}}$.



          It's equivalent to what we do when we write out the fraction in long division, because in each case we're multiplying by 10 when we reduce the modulo, then stop when we've found a repeating number. The highest power of $10$ in which a remainder repeates is where we find out the equivalent fraction.






          share|cite|improve this answer























          • But then what about the example. 1 is subtracted, not 3.
            – xAly
            Nov 3 at 19:01










          • Divide $3$ from $3 cdot 10^6 equiv 3 operatorname {mod} 7$ and use Fermat's Little Theorem ($a^{p-1} = 1 operatorname {mod} p$). If you tried to subtract $3$ from $10^6$ you would have two primes that are not divisible by $7$.
            – bjcolby15
            Nov 3 at 20:20













          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%2f2983133%2fdecimal-expansions-of-rational-numbers%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










          For $dfrac {1}{6} dots$



          $begin {align}
          1operatorname {mod} 6 equiv 1 \
          10operatorname {mod} 6 equiv 4 \
          40operatorname {mod} 6 equiv 4 \
          end {align}$



          $4$ is the repeating number, so we say $color red {10^2 - 4} = 96 = 6 cdot 16$, and $(10^2 - 4)x = (16) rightarrow x = dfrac {16}{10^2-4} rightarrow dfrac {16}{96} rightarrow bbox [2px, border: 2px solid black]{x = .1overline{6}}$.



          For $dfrac {1}{37} dots$



          $begin {align}
          1operatorname {mod} 37 equiv 1 \
          10operatorname {mod} 37 equiv 10 \
          100operatorname {mod} 37 equiv 26 \
          260operatorname {mod} 37 equiv 1 \
          end {align}$



          $1$ is the repeating number, so we say $10^3 - 1 = 999 = 37 cdot 27$, and $color red {(10^3 - 1)}x = 27 rightarrow x = dfrac {27}{10^3-1} rightarrow x = dfrac {27}{999} rightarrow bbox [2px, border: 2px solid black] {x = overline{.027}}$.



          It's equivalent to what we do when we write out the fraction in long division, because in each case we're multiplying by 10 when we reduce the modulo, then stop when we've found a repeating number. The highest power of $10$ in which a remainder repeates is where we find out the equivalent fraction.






          share|cite|improve this answer























          • But then what about the example. 1 is subtracted, not 3.
            – xAly
            Nov 3 at 19:01










          • Divide $3$ from $3 cdot 10^6 equiv 3 operatorname {mod} 7$ and use Fermat's Little Theorem ($a^{p-1} = 1 operatorname {mod} p$). If you tried to subtract $3$ from $10^6$ you would have two primes that are not divisible by $7$.
            – bjcolby15
            Nov 3 at 20:20

















          up vote
          1
          down vote



          accepted










          For $dfrac {1}{6} dots$



          $begin {align}
          1operatorname {mod} 6 equiv 1 \
          10operatorname {mod} 6 equiv 4 \
          40operatorname {mod} 6 equiv 4 \
          end {align}$



          $4$ is the repeating number, so we say $color red {10^2 - 4} = 96 = 6 cdot 16$, and $(10^2 - 4)x = (16) rightarrow x = dfrac {16}{10^2-4} rightarrow dfrac {16}{96} rightarrow bbox [2px, border: 2px solid black]{x = .1overline{6}}$.



          For $dfrac {1}{37} dots$



          $begin {align}
          1operatorname {mod} 37 equiv 1 \
          10operatorname {mod} 37 equiv 10 \
          100operatorname {mod} 37 equiv 26 \
          260operatorname {mod} 37 equiv 1 \
          end {align}$



          $1$ is the repeating number, so we say $10^3 - 1 = 999 = 37 cdot 27$, and $color red {(10^3 - 1)}x = 27 rightarrow x = dfrac {27}{10^3-1} rightarrow x = dfrac {27}{999} rightarrow bbox [2px, border: 2px solid black] {x = overline{.027}}$.



          It's equivalent to what we do when we write out the fraction in long division, because in each case we're multiplying by 10 when we reduce the modulo, then stop when we've found a repeating number. The highest power of $10$ in which a remainder repeates is where we find out the equivalent fraction.






          share|cite|improve this answer























          • But then what about the example. 1 is subtracted, not 3.
            – xAly
            Nov 3 at 19:01










          • Divide $3$ from $3 cdot 10^6 equiv 3 operatorname {mod} 7$ and use Fermat's Little Theorem ($a^{p-1} = 1 operatorname {mod} p$). If you tried to subtract $3$ from $10^6$ you would have two primes that are not divisible by $7$.
            – bjcolby15
            Nov 3 at 20:20















          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          For $dfrac {1}{6} dots$



          $begin {align}
          1operatorname {mod} 6 equiv 1 \
          10operatorname {mod} 6 equiv 4 \
          40operatorname {mod} 6 equiv 4 \
          end {align}$



          $4$ is the repeating number, so we say $color red {10^2 - 4} = 96 = 6 cdot 16$, and $(10^2 - 4)x = (16) rightarrow x = dfrac {16}{10^2-4} rightarrow dfrac {16}{96} rightarrow bbox [2px, border: 2px solid black]{x = .1overline{6}}$.



          For $dfrac {1}{37} dots$



          $begin {align}
          1operatorname {mod} 37 equiv 1 \
          10operatorname {mod} 37 equiv 10 \
          100operatorname {mod} 37 equiv 26 \
          260operatorname {mod} 37 equiv 1 \
          end {align}$



          $1$ is the repeating number, so we say $10^3 - 1 = 999 = 37 cdot 27$, and $color red {(10^3 - 1)}x = 27 rightarrow x = dfrac {27}{10^3-1} rightarrow x = dfrac {27}{999} rightarrow bbox [2px, border: 2px solid black] {x = overline{.027}}$.



          It's equivalent to what we do when we write out the fraction in long division, because in each case we're multiplying by 10 when we reduce the modulo, then stop when we've found a repeating number. The highest power of $10$ in which a remainder repeates is where we find out the equivalent fraction.






          share|cite|improve this answer














          For $dfrac {1}{6} dots$



          $begin {align}
          1operatorname {mod} 6 equiv 1 \
          10operatorname {mod} 6 equiv 4 \
          40operatorname {mod} 6 equiv 4 \
          end {align}$



          $4$ is the repeating number, so we say $color red {10^2 - 4} = 96 = 6 cdot 16$, and $(10^2 - 4)x = (16) rightarrow x = dfrac {16}{10^2-4} rightarrow dfrac {16}{96} rightarrow bbox [2px, border: 2px solid black]{x = .1overline{6}}$.



          For $dfrac {1}{37} dots$



          $begin {align}
          1operatorname {mod} 37 equiv 1 \
          10operatorname {mod} 37 equiv 10 \
          100operatorname {mod} 37 equiv 26 \
          260operatorname {mod} 37 equiv 1 \
          end {align}$



          $1$ is the repeating number, so we say $10^3 - 1 = 999 = 37 cdot 27$, and $color red {(10^3 - 1)}x = 27 rightarrow x = dfrac {27}{10^3-1} rightarrow x = dfrac {27}{999} rightarrow bbox [2px, border: 2px solid black] {x = overline{.027}}$.



          It's equivalent to what we do when we write out the fraction in long division, because in each case we're multiplying by 10 when we reduce the modulo, then stop when we've found a repeating number. The highest power of $10$ in which a remainder repeates is where we find out the equivalent fraction.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Nov 13 at 1:10

























          answered Nov 3 at 18:07









          bjcolby15

          1,0961916




          1,0961916












          • But then what about the example. 1 is subtracted, not 3.
            – xAly
            Nov 3 at 19:01










          • Divide $3$ from $3 cdot 10^6 equiv 3 operatorname {mod} 7$ and use Fermat's Little Theorem ($a^{p-1} = 1 operatorname {mod} p$). If you tried to subtract $3$ from $10^6$ you would have two primes that are not divisible by $7$.
            – bjcolby15
            Nov 3 at 20:20




















          • But then what about the example. 1 is subtracted, not 3.
            – xAly
            Nov 3 at 19:01










          • Divide $3$ from $3 cdot 10^6 equiv 3 operatorname {mod} 7$ and use Fermat's Little Theorem ($a^{p-1} = 1 operatorname {mod} p$). If you tried to subtract $3$ from $10^6$ you would have two primes that are not divisible by $7$.
            – bjcolby15
            Nov 3 at 20:20


















          But then what about the example. 1 is subtracted, not 3.
          – xAly
          Nov 3 at 19:01




          But then what about the example. 1 is subtracted, not 3.
          – xAly
          Nov 3 at 19:01












          Divide $3$ from $3 cdot 10^6 equiv 3 operatorname {mod} 7$ and use Fermat's Little Theorem ($a^{p-1} = 1 operatorname {mod} p$). If you tried to subtract $3$ from $10^6$ you would have two primes that are not divisible by $7$.
          – bjcolby15
          Nov 3 at 20:20






          Divide $3$ from $3 cdot 10^6 equiv 3 operatorname {mod} 7$ and use Fermat's Little Theorem ($a^{p-1} = 1 operatorname {mod} p$). If you tried to subtract $3$ from $10^6$ you would have two primes that are not divisible by $7$.
          – bjcolby15
          Nov 3 at 20:20




















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2983133%2fdecimal-expansions-of-rational-numbers%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

          Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

          ComboBox Display Member on multiple fields

          Is it possible to collect Nectar points via Trainline?