Equations over $mathbb{Z}_{p^n}$












2












$begingroup$


Let $p>2$ be a prime number, $n$ a natural number and $a$ an element of $mathbb{Z}_{p^n}$. Is it possible to count the number of solutions of $x^2=a$ in $mathbb{Z}_{p^n}$?



For example if $a=0$ then it is easy but for the general case I have no idea.



Also It is clear that if $x^2=a$ has a solution in $mathbb{Z}_{p^n}$ then it should have a solution in the field $mathbb{Z}_{p}$.










share|cite|improve this question









$endgroup$












  • $begingroup$
    Use Hensel's lemma.
    $endgroup$
    – Qiaochu Yuan
    Dec 29 '18 at 20:44










  • $begingroup$
    Do you mean Hensel's lemma for the $p$-adic integers ?
    $endgroup$
    – nguyen quang do
    Dec 31 '18 at 13:55
















2












$begingroup$


Let $p>2$ be a prime number, $n$ a natural number and $a$ an element of $mathbb{Z}_{p^n}$. Is it possible to count the number of solutions of $x^2=a$ in $mathbb{Z}_{p^n}$?



For example if $a=0$ then it is easy but for the general case I have no idea.



Also It is clear that if $x^2=a$ has a solution in $mathbb{Z}_{p^n}$ then it should have a solution in the field $mathbb{Z}_{p}$.










share|cite|improve this question









$endgroup$












  • $begingroup$
    Use Hensel's lemma.
    $endgroup$
    – Qiaochu Yuan
    Dec 29 '18 at 20:44










  • $begingroup$
    Do you mean Hensel's lemma for the $p$-adic integers ?
    $endgroup$
    – nguyen quang do
    Dec 31 '18 at 13:55














2












2








2





$begingroup$


Let $p>2$ be a prime number, $n$ a natural number and $a$ an element of $mathbb{Z}_{p^n}$. Is it possible to count the number of solutions of $x^2=a$ in $mathbb{Z}_{p^n}$?



For example if $a=0$ then it is easy but for the general case I have no idea.



Also It is clear that if $x^2=a$ has a solution in $mathbb{Z}_{p^n}$ then it should have a solution in the field $mathbb{Z}_{p}$.










share|cite|improve this question









$endgroup$




Let $p>2$ be a prime number, $n$ a natural number and $a$ an element of $mathbb{Z}_{p^n}$. Is it possible to count the number of solutions of $x^2=a$ in $mathbb{Z}_{p^n}$?



For example if $a=0$ then it is easy but for the general case I have no idea.



Also It is clear that if $x^2=a$ has a solution in $mathbb{Z}_{p^n}$ then it should have a solution in the field $mathbb{Z}_{p}$.







number-theory ring-theory commutative-algebra irreducible-polynomials






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 29 '18 at 20:18









Sara.TSara.T

17610




17610












  • $begingroup$
    Use Hensel's lemma.
    $endgroup$
    – Qiaochu Yuan
    Dec 29 '18 at 20:44










  • $begingroup$
    Do you mean Hensel's lemma for the $p$-adic integers ?
    $endgroup$
    – nguyen quang do
    Dec 31 '18 at 13:55


















  • $begingroup$
    Use Hensel's lemma.
    $endgroup$
    – Qiaochu Yuan
    Dec 29 '18 at 20:44










  • $begingroup$
    Do you mean Hensel's lemma for the $p$-adic integers ?
    $endgroup$
    – nguyen quang do
    Dec 31 '18 at 13:55
















$begingroup$
Use Hensel's lemma.
$endgroup$
– Qiaochu Yuan
Dec 29 '18 at 20:44




$begingroup$
Use Hensel's lemma.
$endgroup$
– Qiaochu Yuan
Dec 29 '18 at 20:44












$begingroup$
Do you mean Hensel's lemma for the $p$-adic integers ?
$endgroup$
– nguyen quang do
Dec 31 '18 at 13:55




$begingroup$
Do you mean Hensel's lemma for the $p$-adic integers ?
$endgroup$
– nguyen quang do
Dec 31 '18 at 13:55










3 Answers
3






active

oldest

votes


















1












$begingroup$

Partial answer:



If $p$ does not divide $a$, then $x^2=a$ has zero or two solutions, because $x^2=1$ has two solutions since $mathbb{Z}_{p^n}^{times}$ is cyclic.






share|cite|improve this answer









$endgroup$





















    0












    $begingroup$

    Your question has been asked a number of times on various math. sites, and complete answers exist (see e.g.(1)). I give here a sketch of an elementary proof, as well as closed formulas without detailed calculations. Denote by $mathbf Z/mmathbf Z$ (or $mathbf Z/m$ for short (2)) the ring of integers mod $m$. We want to compute the number $s(n)$ of squares in $mathbf Z/n$. By the CRT, we are brought back to compute $s(p^n)$, where $p$ is a prime. Denote by $s^*(p^n)$ the number of squares in the group $(mathbf Z/m)^*$ of units (=invertible elements) of $mathbf Z/m$ .



    1) Let us first compute $s^*(p^n)$ for $p$ odd. It is classically known that in this case $(mathbf Z/p^n)^*$ is a cyclic group of order $phi(p^n)=p^{n-1}(p-1)$, hence $s^*(p^n)=phi(p^n)/2$. The case $p=2$ is (as usual) technically more complicated, but the structure of $(mathbf Z/2^n)^*$ is known, hence also $s^*(2^n)$ (no use to write it down).



    2) The non units of $mathbf Z/p^n$ are the classes mod $p^n$ of the multiples of $p$ in $mathbf Z$. For $nge3$, it is straightforward to show that $a$ mod $p^{n-2}$ is a square iff $ap^2$ mod $p^n$ is a square, and we can derive the recursion formula $s(p^n)=s^*(p^n)+s(p^{n-2})$. For $n=1,2$, direct computation shows that $s(p)=(p+1)/2$ (obviously) and $s(p^2)=s^*(p^2)+1=(p^2-p+2)/2$ (without difficulty). Applying the recursion formula for $p$ odd, $nge3$, we get $s(p^n)=(p^{n+1}+p+2)/2$ (resp. $(p^{n+1}+2p+1)/2(p+1)$) if $n$ is even (resp. odd), see (1). Analogous formulas exist for $p=2$.



    (1) W. D. Stangl, "Counting squares in $mathbf Z_n$", Math. Magazine, 69,4 (1994), 285-289.



    (2) As a number theorist, I'm 200% against the notation $mathbf Z_n$, at least because $mathbf Z_p$ is reserved for the ring of $p$-adic integers and, from this view point (that of $p$-adic completion), $mathbf Z_n$ makes no sense.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      Thanks for your comments. But I did not ask the number of squares. As it is clear from my question, I am looking for the number of square roots of a fixed element in $mathbb{Z}_n$.
      $endgroup$
      – Sara.T
      Jan 1 at 6:23



















    0












    $begingroup$

    Oh! Sorry, I was careless. But the answer to your original question is elementary enough. For convenience, write $bar x$ for the class of $x$ mod $p^n$. We keep in store the properties of $mathbf Z/p^n$ recalled above ($pneq2$). Suppose that $bar a neq bar0$ is a square, say $bar a={bar x}^2$, and look for all $bar y$ s.t. ${bar y}^2={bar x}^2$. Obviously, $bar a$ is a unit iff $bar x$ is, so we distinguish 2 cases:



    1) $bar a$ is a unit: then ${bar y}^2={bar x}^2$ iff $({bar y}{bar x}^{-1})^2=bar 1$, iff $bar y=pm bar x$ (we are working in the cyclic group of units).



    2) $bar a$ is not a unit: by our previous characterization of the non-units, this is equivalent to $x$ being a multiple of $p$. The equation ${bar y}^2={bar x}^2$ can be written as $(bar y+bar x)(bar y-bar x)=bar 0$. This implies that ($bar ypm bar x$) is a divisor of $0$, or equivalently ($bar ypm bar x$) is a non-unit, or $y equiv pm x$ mod $p$. Denote by $v(.)$ the $p$-adic valuation and write $x=up^{v(x)}, y=wp^{v(y)}$ in $mathbf Z$, with $p nmid uw$. Note that $bar a neq bar0$ means that $v(a)<n$, hence $bar a={bar y}^2={bar x}^2$ implies that $2v(x)=2v(y)=v(a)le n$. Thus $y^2-x^2=p^{v(a)}(w^2-u^2)$ and the equation $y^2-x^2=kp^n$ means that $w^2-u^2equiv 0$ mod $p^{n-v(a)}$, or equivalently $wequivpm u$ mod $p^{n-v(a)}$ since $bar w, bar u$ are units mod $p$.



    Summarizing, the number of square roots of a given $bar a$ is $0$, or $2$, or $2phi(p^{n-v(a)})$.






    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%2f3056215%2fequations-over-mathbbz-pn%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1












      $begingroup$

      Partial answer:



      If $p$ does not divide $a$, then $x^2=a$ has zero or two solutions, because $x^2=1$ has two solutions since $mathbb{Z}_{p^n}^{times}$ is cyclic.






      share|cite|improve this answer









      $endgroup$


















        1












        $begingroup$

        Partial answer:



        If $p$ does not divide $a$, then $x^2=a$ has zero or two solutions, because $x^2=1$ has two solutions since $mathbb{Z}_{p^n}^{times}$ is cyclic.






        share|cite|improve this answer









        $endgroup$
















          1












          1








          1





          $begingroup$

          Partial answer:



          If $p$ does not divide $a$, then $x^2=a$ has zero or two solutions, because $x^2=1$ has two solutions since $mathbb{Z}_{p^n}^{times}$ is cyclic.






          share|cite|improve this answer









          $endgroup$



          Partial answer:



          If $p$ does not divide $a$, then $x^2=a$ has zero or two solutions, because $x^2=1$ has two solutions since $mathbb{Z}_{p^n}^{times}$ is cyclic.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Dec 29 '18 at 20:24









          lhflhf

          166k10171401




          166k10171401























              0












              $begingroup$

              Your question has been asked a number of times on various math. sites, and complete answers exist (see e.g.(1)). I give here a sketch of an elementary proof, as well as closed formulas without detailed calculations. Denote by $mathbf Z/mmathbf Z$ (or $mathbf Z/m$ for short (2)) the ring of integers mod $m$. We want to compute the number $s(n)$ of squares in $mathbf Z/n$. By the CRT, we are brought back to compute $s(p^n)$, where $p$ is a prime. Denote by $s^*(p^n)$ the number of squares in the group $(mathbf Z/m)^*$ of units (=invertible elements) of $mathbf Z/m$ .



              1) Let us first compute $s^*(p^n)$ for $p$ odd. It is classically known that in this case $(mathbf Z/p^n)^*$ is a cyclic group of order $phi(p^n)=p^{n-1}(p-1)$, hence $s^*(p^n)=phi(p^n)/2$. The case $p=2$ is (as usual) technically more complicated, but the structure of $(mathbf Z/2^n)^*$ is known, hence also $s^*(2^n)$ (no use to write it down).



              2) The non units of $mathbf Z/p^n$ are the classes mod $p^n$ of the multiples of $p$ in $mathbf Z$. For $nge3$, it is straightforward to show that $a$ mod $p^{n-2}$ is a square iff $ap^2$ mod $p^n$ is a square, and we can derive the recursion formula $s(p^n)=s^*(p^n)+s(p^{n-2})$. For $n=1,2$, direct computation shows that $s(p)=(p+1)/2$ (obviously) and $s(p^2)=s^*(p^2)+1=(p^2-p+2)/2$ (without difficulty). Applying the recursion formula for $p$ odd, $nge3$, we get $s(p^n)=(p^{n+1}+p+2)/2$ (resp. $(p^{n+1}+2p+1)/2(p+1)$) if $n$ is even (resp. odd), see (1). Analogous formulas exist for $p=2$.



              (1) W. D. Stangl, "Counting squares in $mathbf Z_n$", Math. Magazine, 69,4 (1994), 285-289.



              (2) As a number theorist, I'm 200% against the notation $mathbf Z_n$, at least because $mathbf Z_p$ is reserved for the ring of $p$-adic integers and, from this view point (that of $p$-adic completion), $mathbf Z_n$ makes no sense.






              share|cite|improve this answer









              $endgroup$













              • $begingroup$
                Thanks for your comments. But I did not ask the number of squares. As it is clear from my question, I am looking for the number of square roots of a fixed element in $mathbb{Z}_n$.
                $endgroup$
                – Sara.T
                Jan 1 at 6:23
















              0












              $begingroup$

              Your question has been asked a number of times on various math. sites, and complete answers exist (see e.g.(1)). I give here a sketch of an elementary proof, as well as closed formulas without detailed calculations. Denote by $mathbf Z/mmathbf Z$ (or $mathbf Z/m$ for short (2)) the ring of integers mod $m$. We want to compute the number $s(n)$ of squares in $mathbf Z/n$. By the CRT, we are brought back to compute $s(p^n)$, where $p$ is a prime. Denote by $s^*(p^n)$ the number of squares in the group $(mathbf Z/m)^*$ of units (=invertible elements) of $mathbf Z/m$ .



              1) Let us first compute $s^*(p^n)$ for $p$ odd. It is classically known that in this case $(mathbf Z/p^n)^*$ is a cyclic group of order $phi(p^n)=p^{n-1}(p-1)$, hence $s^*(p^n)=phi(p^n)/2$. The case $p=2$ is (as usual) technically more complicated, but the structure of $(mathbf Z/2^n)^*$ is known, hence also $s^*(2^n)$ (no use to write it down).



              2) The non units of $mathbf Z/p^n$ are the classes mod $p^n$ of the multiples of $p$ in $mathbf Z$. For $nge3$, it is straightforward to show that $a$ mod $p^{n-2}$ is a square iff $ap^2$ mod $p^n$ is a square, and we can derive the recursion formula $s(p^n)=s^*(p^n)+s(p^{n-2})$. For $n=1,2$, direct computation shows that $s(p)=(p+1)/2$ (obviously) and $s(p^2)=s^*(p^2)+1=(p^2-p+2)/2$ (without difficulty). Applying the recursion formula for $p$ odd, $nge3$, we get $s(p^n)=(p^{n+1}+p+2)/2$ (resp. $(p^{n+1}+2p+1)/2(p+1)$) if $n$ is even (resp. odd), see (1). Analogous formulas exist for $p=2$.



              (1) W. D. Stangl, "Counting squares in $mathbf Z_n$", Math. Magazine, 69,4 (1994), 285-289.



              (2) As a number theorist, I'm 200% against the notation $mathbf Z_n$, at least because $mathbf Z_p$ is reserved for the ring of $p$-adic integers and, from this view point (that of $p$-adic completion), $mathbf Z_n$ makes no sense.






              share|cite|improve this answer









              $endgroup$













              • $begingroup$
                Thanks for your comments. But I did not ask the number of squares. As it is clear from my question, I am looking for the number of square roots of a fixed element in $mathbb{Z}_n$.
                $endgroup$
                – Sara.T
                Jan 1 at 6:23














              0












              0








              0





              $begingroup$

              Your question has been asked a number of times on various math. sites, and complete answers exist (see e.g.(1)). I give here a sketch of an elementary proof, as well as closed formulas without detailed calculations. Denote by $mathbf Z/mmathbf Z$ (or $mathbf Z/m$ for short (2)) the ring of integers mod $m$. We want to compute the number $s(n)$ of squares in $mathbf Z/n$. By the CRT, we are brought back to compute $s(p^n)$, where $p$ is a prime. Denote by $s^*(p^n)$ the number of squares in the group $(mathbf Z/m)^*$ of units (=invertible elements) of $mathbf Z/m$ .



              1) Let us first compute $s^*(p^n)$ for $p$ odd. It is classically known that in this case $(mathbf Z/p^n)^*$ is a cyclic group of order $phi(p^n)=p^{n-1}(p-1)$, hence $s^*(p^n)=phi(p^n)/2$. The case $p=2$ is (as usual) technically more complicated, but the structure of $(mathbf Z/2^n)^*$ is known, hence also $s^*(2^n)$ (no use to write it down).



              2) The non units of $mathbf Z/p^n$ are the classes mod $p^n$ of the multiples of $p$ in $mathbf Z$. For $nge3$, it is straightforward to show that $a$ mod $p^{n-2}$ is a square iff $ap^2$ mod $p^n$ is a square, and we can derive the recursion formula $s(p^n)=s^*(p^n)+s(p^{n-2})$. For $n=1,2$, direct computation shows that $s(p)=(p+1)/2$ (obviously) and $s(p^2)=s^*(p^2)+1=(p^2-p+2)/2$ (without difficulty). Applying the recursion formula for $p$ odd, $nge3$, we get $s(p^n)=(p^{n+1}+p+2)/2$ (resp. $(p^{n+1}+2p+1)/2(p+1)$) if $n$ is even (resp. odd), see (1). Analogous formulas exist for $p=2$.



              (1) W. D. Stangl, "Counting squares in $mathbf Z_n$", Math. Magazine, 69,4 (1994), 285-289.



              (2) As a number theorist, I'm 200% against the notation $mathbf Z_n$, at least because $mathbf Z_p$ is reserved for the ring of $p$-adic integers and, from this view point (that of $p$-adic completion), $mathbf Z_n$ makes no sense.






              share|cite|improve this answer









              $endgroup$



              Your question has been asked a number of times on various math. sites, and complete answers exist (see e.g.(1)). I give here a sketch of an elementary proof, as well as closed formulas without detailed calculations. Denote by $mathbf Z/mmathbf Z$ (or $mathbf Z/m$ for short (2)) the ring of integers mod $m$. We want to compute the number $s(n)$ of squares in $mathbf Z/n$. By the CRT, we are brought back to compute $s(p^n)$, where $p$ is a prime. Denote by $s^*(p^n)$ the number of squares in the group $(mathbf Z/m)^*$ of units (=invertible elements) of $mathbf Z/m$ .



              1) Let us first compute $s^*(p^n)$ for $p$ odd. It is classically known that in this case $(mathbf Z/p^n)^*$ is a cyclic group of order $phi(p^n)=p^{n-1}(p-1)$, hence $s^*(p^n)=phi(p^n)/2$. The case $p=2$ is (as usual) technically more complicated, but the structure of $(mathbf Z/2^n)^*$ is known, hence also $s^*(2^n)$ (no use to write it down).



              2) The non units of $mathbf Z/p^n$ are the classes mod $p^n$ of the multiples of $p$ in $mathbf Z$. For $nge3$, it is straightforward to show that $a$ mod $p^{n-2}$ is a square iff $ap^2$ mod $p^n$ is a square, and we can derive the recursion formula $s(p^n)=s^*(p^n)+s(p^{n-2})$. For $n=1,2$, direct computation shows that $s(p)=(p+1)/2$ (obviously) and $s(p^2)=s^*(p^2)+1=(p^2-p+2)/2$ (without difficulty). Applying the recursion formula for $p$ odd, $nge3$, we get $s(p^n)=(p^{n+1}+p+2)/2$ (resp. $(p^{n+1}+2p+1)/2(p+1)$) if $n$ is even (resp. odd), see (1). Analogous formulas exist for $p=2$.



              (1) W. D. Stangl, "Counting squares in $mathbf Z_n$", Math. Magazine, 69,4 (1994), 285-289.



              (2) As a number theorist, I'm 200% against the notation $mathbf Z_n$, at least because $mathbf Z_p$ is reserved for the ring of $p$-adic integers and, from this view point (that of $p$-adic completion), $mathbf Z_n$ makes no sense.







              share|cite|improve this answer












              share|cite|improve this answer



              share|cite|improve this answer










              answered Dec 31 '18 at 13:54









              nguyen quang donguyen quang do

              9,0091724




              9,0091724












              • $begingroup$
                Thanks for your comments. But I did not ask the number of squares. As it is clear from my question, I am looking for the number of square roots of a fixed element in $mathbb{Z}_n$.
                $endgroup$
                – Sara.T
                Jan 1 at 6:23


















              • $begingroup$
                Thanks for your comments. But I did not ask the number of squares. As it is clear from my question, I am looking for the number of square roots of a fixed element in $mathbb{Z}_n$.
                $endgroup$
                – Sara.T
                Jan 1 at 6:23
















              $begingroup$
              Thanks for your comments. But I did not ask the number of squares. As it is clear from my question, I am looking for the number of square roots of a fixed element in $mathbb{Z}_n$.
              $endgroup$
              – Sara.T
              Jan 1 at 6:23




              $begingroup$
              Thanks for your comments. But I did not ask the number of squares. As it is clear from my question, I am looking for the number of square roots of a fixed element in $mathbb{Z}_n$.
              $endgroup$
              – Sara.T
              Jan 1 at 6:23











              0












              $begingroup$

              Oh! Sorry, I was careless. But the answer to your original question is elementary enough. For convenience, write $bar x$ for the class of $x$ mod $p^n$. We keep in store the properties of $mathbf Z/p^n$ recalled above ($pneq2$). Suppose that $bar a neq bar0$ is a square, say $bar a={bar x}^2$, and look for all $bar y$ s.t. ${bar y}^2={bar x}^2$. Obviously, $bar a$ is a unit iff $bar x$ is, so we distinguish 2 cases:



              1) $bar a$ is a unit: then ${bar y}^2={bar x}^2$ iff $({bar y}{bar x}^{-1})^2=bar 1$, iff $bar y=pm bar x$ (we are working in the cyclic group of units).



              2) $bar a$ is not a unit: by our previous characterization of the non-units, this is equivalent to $x$ being a multiple of $p$. The equation ${bar y}^2={bar x}^2$ can be written as $(bar y+bar x)(bar y-bar x)=bar 0$. This implies that ($bar ypm bar x$) is a divisor of $0$, or equivalently ($bar ypm bar x$) is a non-unit, or $y equiv pm x$ mod $p$. Denote by $v(.)$ the $p$-adic valuation and write $x=up^{v(x)}, y=wp^{v(y)}$ in $mathbf Z$, with $p nmid uw$. Note that $bar a neq bar0$ means that $v(a)<n$, hence $bar a={bar y}^2={bar x}^2$ implies that $2v(x)=2v(y)=v(a)le n$. Thus $y^2-x^2=p^{v(a)}(w^2-u^2)$ and the equation $y^2-x^2=kp^n$ means that $w^2-u^2equiv 0$ mod $p^{n-v(a)}$, or equivalently $wequivpm u$ mod $p^{n-v(a)}$ since $bar w, bar u$ are units mod $p$.



              Summarizing, the number of square roots of a given $bar a$ is $0$, or $2$, or $2phi(p^{n-v(a)})$.






              share|cite|improve this answer











              $endgroup$


















                0












                $begingroup$

                Oh! Sorry, I was careless. But the answer to your original question is elementary enough. For convenience, write $bar x$ for the class of $x$ mod $p^n$. We keep in store the properties of $mathbf Z/p^n$ recalled above ($pneq2$). Suppose that $bar a neq bar0$ is a square, say $bar a={bar x}^2$, and look for all $bar y$ s.t. ${bar y}^2={bar x}^2$. Obviously, $bar a$ is a unit iff $bar x$ is, so we distinguish 2 cases:



                1) $bar a$ is a unit: then ${bar y}^2={bar x}^2$ iff $({bar y}{bar x}^{-1})^2=bar 1$, iff $bar y=pm bar x$ (we are working in the cyclic group of units).



                2) $bar a$ is not a unit: by our previous characterization of the non-units, this is equivalent to $x$ being a multiple of $p$. The equation ${bar y}^2={bar x}^2$ can be written as $(bar y+bar x)(bar y-bar x)=bar 0$. This implies that ($bar ypm bar x$) is a divisor of $0$, or equivalently ($bar ypm bar x$) is a non-unit, or $y equiv pm x$ mod $p$. Denote by $v(.)$ the $p$-adic valuation and write $x=up^{v(x)}, y=wp^{v(y)}$ in $mathbf Z$, with $p nmid uw$. Note that $bar a neq bar0$ means that $v(a)<n$, hence $bar a={bar y}^2={bar x}^2$ implies that $2v(x)=2v(y)=v(a)le n$. Thus $y^2-x^2=p^{v(a)}(w^2-u^2)$ and the equation $y^2-x^2=kp^n$ means that $w^2-u^2equiv 0$ mod $p^{n-v(a)}$, or equivalently $wequivpm u$ mod $p^{n-v(a)}$ since $bar w, bar u$ are units mod $p$.



                Summarizing, the number of square roots of a given $bar a$ is $0$, or $2$, or $2phi(p^{n-v(a)})$.






                share|cite|improve this answer











                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  Oh! Sorry, I was careless. But the answer to your original question is elementary enough. For convenience, write $bar x$ for the class of $x$ mod $p^n$. We keep in store the properties of $mathbf Z/p^n$ recalled above ($pneq2$). Suppose that $bar a neq bar0$ is a square, say $bar a={bar x}^2$, and look for all $bar y$ s.t. ${bar y}^2={bar x}^2$. Obviously, $bar a$ is a unit iff $bar x$ is, so we distinguish 2 cases:



                  1) $bar a$ is a unit: then ${bar y}^2={bar x}^2$ iff $({bar y}{bar x}^{-1})^2=bar 1$, iff $bar y=pm bar x$ (we are working in the cyclic group of units).



                  2) $bar a$ is not a unit: by our previous characterization of the non-units, this is equivalent to $x$ being a multiple of $p$. The equation ${bar y}^2={bar x}^2$ can be written as $(bar y+bar x)(bar y-bar x)=bar 0$. This implies that ($bar ypm bar x$) is a divisor of $0$, or equivalently ($bar ypm bar x$) is a non-unit, or $y equiv pm x$ mod $p$. Denote by $v(.)$ the $p$-adic valuation and write $x=up^{v(x)}, y=wp^{v(y)}$ in $mathbf Z$, with $p nmid uw$. Note that $bar a neq bar0$ means that $v(a)<n$, hence $bar a={bar y}^2={bar x}^2$ implies that $2v(x)=2v(y)=v(a)le n$. Thus $y^2-x^2=p^{v(a)}(w^2-u^2)$ and the equation $y^2-x^2=kp^n$ means that $w^2-u^2equiv 0$ mod $p^{n-v(a)}$, or equivalently $wequivpm u$ mod $p^{n-v(a)}$ since $bar w, bar u$ are units mod $p$.



                  Summarizing, the number of square roots of a given $bar a$ is $0$, or $2$, or $2phi(p^{n-v(a)})$.






                  share|cite|improve this answer











                  $endgroup$



                  Oh! Sorry, I was careless. But the answer to your original question is elementary enough. For convenience, write $bar x$ for the class of $x$ mod $p^n$. We keep in store the properties of $mathbf Z/p^n$ recalled above ($pneq2$). Suppose that $bar a neq bar0$ is a square, say $bar a={bar x}^2$, and look for all $bar y$ s.t. ${bar y}^2={bar x}^2$. Obviously, $bar a$ is a unit iff $bar x$ is, so we distinguish 2 cases:



                  1) $bar a$ is a unit: then ${bar y}^2={bar x}^2$ iff $({bar y}{bar x}^{-1})^2=bar 1$, iff $bar y=pm bar x$ (we are working in the cyclic group of units).



                  2) $bar a$ is not a unit: by our previous characterization of the non-units, this is equivalent to $x$ being a multiple of $p$. The equation ${bar y}^2={bar x}^2$ can be written as $(bar y+bar x)(bar y-bar x)=bar 0$. This implies that ($bar ypm bar x$) is a divisor of $0$, or equivalently ($bar ypm bar x$) is a non-unit, or $y equiv pm x$ mod $p$. Denote by $v(.)$ the $p$-adic valuation and write $x=up^{v(x)}, y=wp^{v(y)}$ in $mathbf Z$, with $p nmid uw$. Note that $bar a neq bar0$ means that $v(a)<n$, hence $bar a={bar y}^2={bar x}^2$ implies that $2v(x)=2v(y)=v(a)le n$. Thus $y^2-x^2=p^{v(a)}(w^2-u^2)$ and the equation $y^2-x^2=kp^n$ means that $w^2-u^2equiv 0$ mod $p^{n-v(a)}$, or equivalently $wequivpm u$ mod $p^{n-v(a)}$ since $bar w, bar u$ are units mod $p$.



                  Summarizing, the number of square roots of a given $bar a$ is $0$, or $2$, or $2phi(p^{n-v(a)})$.







                  share|cite|improve this answer














                  share|cite|improve this answer



                  share|cite|improve this answer








                  edited Jan 1 at 15:50

























                  answered Jan 1 at 8:57









                  nguyen quang donguyen quang do

                  9,0091724




                  9,0091724






























                      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%2f3056215%2fequations-over-mathbbz-pn%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

                      Wiesbaden

                      Marschland

                      Dieringhausen