If a prime can be expressed as sum of square of two integers, then prove that the representation is unique.












9












$begingroup$


If a prime can be expressed as sum of two squares, then prove that the representation is unique.



My attempt:

If $a^2+b^2=p$, then it is obvious that $a,b$ of different parity.

Now, I assume the contraposition that the representation is not unique, $p=a^2+b^2=c^2+d^2$. Again, $c,d$ are of different parity.



Now, let $b,d$ be even and $a,c$ be odd.



So, $a^2+b^2=c^2+d^2 implies a^2-c^2=d^2-b^2 implies (a+c)(a-c)=(d-b)(d+b)$.



I cannot proceed any further. Please help.










share|cite|improve this question









$endgroup$












  • $begingroup$
    Nitpick corner case: $2 = 1^2 + 1^2$, so not necessarily of different parity. This would most likely be taken care of in a different case. :)
    $endgroup$
    – apnorton
    Mar 20 '14 at 12:02










  • $begingroup$
    @anorton That is definitely something I didn't think about...thanks for identification
    $endgroup$
    – Hawk
    Mar 20 '14 at 12:02
















9












$begingroup$


If a prime can be expressed as sum of two squares, then prove that the representation is unique.



My attempt:

If $a^2+b^2=p$, then it is obvious that $a,b$ of different parity.

Now, I assume the contraposition that the representation is not unique, $p=a^2+b^2=c^2+d^2$. Again, $c,d$ are of different parity.



Now, let $b,d$ be even and $a,c$ be odd.



So, $a^2+b^2=c^2+d^2 implies a^2-c^2=d^2-b^2 implies (a+c)(a-c)=(d-b)(d+b)$.



I cannot proceed any further. Please help.










share|cite|improve this question









$endgroup$












  • $begingroup$
    Nitpick corner case: $2 = 1^2 + 1^2$, so not necessarily of different parity. This would most likely be taken care of in a different case. :)
    $endgroup$
    – apnorton
    Mar 20 '14 at 12:02










  • $begingroup$
    @anorton That is definitely something I didn't think about...thanks for identification
    $endgroup$
    – Hawk
    Mar 20 '14 at 12:02














9












9








9


5



$begingroup$


If a prime can be expressed as sum of two squares, then prove that the representation is unique.



My attempt:

If $a^2+b^2=p$, then it is obvious that $a,b$ of different parity.

Now, I assume the contraposition that the representation is not unique, $p=a^2+b^2=c^2+d^2$. Again, $c,d$ are of different parity.



Now, let $b,d$ be even and $a,c$ be odd.



So, $a^2+b^2=c^2+d^2 implies a^2-c^2=d^2-b^2 implies (a+c)(a-c)=(d-b)(d+b)$.



I cannot proceed any further. Please help.










share|cite|improve this question









$endgroup$




If a prime can be expressed as sum of two squares, then prove that the representation is unique.



My attempt:

If $a^2+b^2=p$, then it is obvious that $a,b$ of different parity.

Now, I assume the contraposition that the representation is not unique, $p=a^2+b^2=c^2+d^2$. Again, $c,d$ are of different parity.



Now, let $b,d$ be even and $a,c$ be odd.



So, $a^2+b^2=c^2+d^2 implies a^2-c^2=d^2-b^2 implies (a+c)(a-c)=(d-b)(d+b)$.



I cannot proceed any further. Please help.







elementary-number-theory prime-numbers sums-of-squares






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Mar 20 '14 at 11:53









HawkHawk

3,7431654




3,7431654












  • $begingroup$
    Nitpick corner case: $2 = 1^2 + 1^2$, so not necessarily of different parity. This would most likely be taken care of in a different case. :)
    $endgroup$
    – apnorton
    Mar 20 '14 at 12:02










  • $begingroup$
    @anorton That is definitely something I didn't think about...thanks for identification
    $endgroup$
    – Hawk
    Mar 20 '14 at 12:02


















  • $begingroup$
    Nitpick corner case: $2 = 1^2 + 1^2$, so not necessarily of different parity. This would most likely be taken care of in a different case. :)
    $endgroup$
    – apnorton
    Mar 20 '14 at 12:02










  • $begingroup$
    @anorton That is definitely something I didn't think about...thanks for identification
    $endgroup$
    – Hawk
    Mar 20 '14 at 12:02
















$begingroup$
Nitpick corner case: $2 = 1^2 + 1^2$, so not necessarily of different parity. This would most likely be taken care of in a different case. :)
$endgroup$
– apnorton
Mar 20 '14 at 12:02




$begingroup$
Nitpick corner case: $2 = 1^2 + 1^2$, so not necessarily of different parity. This would most likely be taken care of in a different case. :)
$endgroup$
– apnorton
Mar 20 '14 at 12:02












$begingroup$
@anorton That is definitely something I didn't think about...thanks for identification
$endgroup$
– Hawk
Mar 20 '14 at 12:02




$begingroup$
@anorton That is definitely something I didn't think about...thanks for identification
$endgroup$
– Hawk
Mar 20 '14 at 12:02










4 Answers
4






active

oldest

votes


















12












$begingroup$

The slickest way is via a little Algebraic Number Theory. If $p=a^2+b^2=c^2+d^2$ then $$p=(a+bi)(a-bi)=(c+di)(c-di)$$ Now ${bf Z}[i]$ is a unique factorization domain, so these two factorizations of $p$ show that $a+bi$ can't be a prime in ${bf Z}[i]$. We must have a non-trivial factorization $a+bi=(s+ti)(u+vi)$, whence $a-bi=(s-ti)(u-vi)$, and then $$p=(s^2+t^2)(u^2+v^2)$$ contradicting primality of $p$.



There are ways to answer your question without these advanced concepts, but I can never remember how it's done. I'm sure someone else will.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Thanks for the approach...I will try to do something with this.
    $endgroup$
    – Hawk
    Mar 20 '14 at 12:00










  • $begingroup$
    How do you deduce that $a+bi$ is not prime from the UFD property of $mathbb{Z}[i]$?
    $endgroup$
    – Cary
    Sep 18 '16 at 15:59










  • $begingroup$
    @Cary, maybe it would be better to say that $a+bi$ and $c+di$ can't both be prime (in ${bf Z}[i]$), since that would give us two different prime factorizations of $p$. Then without loss of generality we may assume $a+bi$ is not prime.
    $endgroup$
    – Gerry Myerson
    Sep 18 '16 at 22:59










  • $begingroup$
    @GerryMyerson: if $p$ is an ordinary prime, then $p$ is either a Gauss prime or the product of a Gauss prime and its conjugate. Clearly, we are in the latter case. Can't we just say that if $p=(a+bi)(a-bi)=(c+di)(c-di)$ are two prime factorizations, then $a+bi=u(c+di)$ or $a+bi=u(c-di)$ for $u$ a unit. In either case, we have $(a,b)=(pm c, pm d)$ or $(a,b) = (pm d, pm c)$, which implies $a^2+b^2=c^2+d^2$?
    $endgroup$
    – Cary
    Sep 19 '16 at 7:08












  • $begingroup$
    @Cary, I was trying to do it using just the UFD property, and not the result about how rational primes factor in the Gaussian integers.
    $endgroup$
    – Gerry Myerson
    Sep 19 '16 at 7:13



















4












$begingroup$

Here's an answer without Algebraic Number Theory. I found it in Shanks, Solved and Unsolved Problems in Number Theory.



Assume $$p=a^2+b^2=c^2+d^2tag1$$ with all variables positive integers. Then $$p^2=(a^2+b^2)(c^2+d^2)=a^2c^2+a^2d^2+b^2c^2+b^2d^2$$ and you can verify by just multiplying everything out that $$p^2=(ac+bd)^2+(ad-bc)^2tag2$$ and $$p^2=(ac-bd)^2+(ad+bc)^2tag3$$ By (1), we have $$(p-a^2)d^2=(p-c^2)b^2$$ which implies $$p(d^2-b^2)=(ad-bc)(ad+bc)tag4$$ From (4), $p$ divides $ad-bc$, or $p$ divides $ad+bc$. If $p$ divides $ad-bc$, then from (2) we get $ad-bc=0$, so $d^2-b^2=0$, so $b=d$. If $p$ divides $ad+bc$, then from (3) we get $ac=bd$. Now $a$ and $b$ are relatively prime, so $a$ divides $d$, and $b$ divides $c$. Then by (1) we have $a=d$, and we have proved that the two representations of $p$ are the same.



This is probably something like what @Konstantinos was getting at in his answer.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Just noting that $(a^2+b^2)(c^2+d^2)=(ac+bd)^2+(ad-bc)^2=(ac-bd)^2+(ad+bc)^2$ states that if a number is the product of two sums of squares,then the number can also be written as the sum of two squares.This is the sum of squares identity of Diophantus.
    $endgroup$
    – rah4927
    Mar 21 '14 at 9:11





















0












$begingroup$

The problem is trivialized if you are given that $x^2+y^2=n$ has $r_2(n)=4sum_{d|n} sin(pi d/2) $ solutions in the integers.



The number of ways $r_2(p)=4sum_{d|p} sin(frac{pi d}{2})=4(1+sin(pi p/2))$.



If $sin(pi p /2)=1$ then there are 8 solution in the integers. Namely, $(pm a,pm b)$ and $(pm b, pm a)$ satisfy $x^2+y^2=p$ where $aneq b$. There is another way one might imagine $8$ solutions: $(0,pm a),(pm a,0)$ and $(pm b,pm b)$ but this cannot happen because it would mean that $p$ is a perfect square and therefore not prime.



If $sin(pi p /2)=-1$ then we cannot write $p$ as the sum of squares.



$If sin(pi p /2)=0$ then $p=2$.






share|cite|improve this answer











$endgroup$





















    -1












    $begingroup$

    If $p=a^2+b^2=c^2+d^2$ then $$p=frac{(ac+bd)(ac-bd)}{(a+d)(a-d)}$$






    share|cite|improve this answer









    $endgroup$









    • 3




      $begingroup$
      How is that supposed to help?
      $endgroup$
      – Hawk
      Mar 20 '14 at 17:48










    • $begingroup$
      It is a contradiction this shows that $p$ must be composite.Maybe i will edit it later when i will have time!
      $endgroup$
      – Konstantinos Gaitanas
      Mar 20 '14 at 18:01












    Your Answer








    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%2f719700%2fif-a-prime-can-be-expressed-as-sum-of-square-of-two-integers-then-prove-that-th%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    12












    $begingroup$

    The slickest way is via a little Algebraic Number Theory. If $p=a^2+b^2=c^2+d^2$ then $$p=(a+bi)(a-bi)=(c+di)(c-di)$$ Now ${bf Z}[i]$ is a unique factorization domain, so these two factorizations of $p$ show that $a+bi$ can't be a prime in ${bf Z}[i]$. We must have a non-trivial factorization $a+bi=(s+ti)(u+vi)$, whence $a-bi=(s-ti)(u-vi)$, and then $$p=(s^2+t^2)(u^2+v^2)$$ contradicting primality of $p$.



    There are ways to answer your question without these advanced concepts, but I can never remember how it's done. I'm sure someone else will.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      Thanks for the approach...I will try to do something with this.
      $endgroup$
      – Hawk
      Mar 20 '14 at 12:00










    • $begingroup$
      How do you deduce that $a+bi$ is not prime from the UFD property of $mathbb{Z}[i]$?
      $endgroup$
      – Cary
      Sep 18 '16 at 15:59










    • $begingroup$
      @Cary, maybe it would be better to say that $a+bi$ and $c+di$ can't both be prime (in ${bf Z}[i]$), since that would give us two different prime factorizations of $p$. Then without loss of generality we may assume $a+bi$ is not prime.
      $endgroup$
      – Gerry Myerson
      Sep 18 '16 at 22:59










    • $begingroup$
      @GerryMyerson: if $p$ is an ordinary prime, then $p$ is either a Gauss prime or the product of a Gauss prime and its conjugate. Clearly, we are in the latter case. Can't we just say that if $p=(a+bi)(a-bi)=(c+di)(c-di)$ are two prime factorizations, then $a+bi=u(c+di)$ or $a+bi=u(c-di)$ for $u$ a unit. In either case, we have $(a,b)=(pm c, pm d)$ or $(a,b) = (pm d, pm c)$, which implies $a^2+b^2=c^2+d^2$?
      $endgroup$
      – Cary
      Sep 19 '16 at 7:08












    • $begingroup$
      @Cary, I was trying to do it using just the UFD property, and not the result about how rational primes factor in the Gaussian integers.
      $endgroup$
      – Gerry Myerson
      Sep 19 '16 at 7:13
















    12












    $begingroup$

    The slickest way is via a little Algebraic Number Theory. If $p=a^2+b^2=c^2+d^2$ then $$p=(a+bi)(a-bi)=(c+di)(c-di)$$ Now ${bf Z}[i]$ is a unique factorization domain, so these two factorizations of $p$ show that $a+bi$ can't be a prime in ${bf Z}[i]$. We must have a non-trivial factorization $a+bi=(s+ti)(u+vi)$, whence $a-bi=(s-ti)(u-vi)$, and then $$p=(s^2+t^2)(u^2+v^2)$$ contradicting primality of $p$.



    There are ways to answer your question without these advanced concepts, but I can never remember how it's done. I'm sure someone else will.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      Thanks for the approach...I will try to do something with this.
      $endgroup$
      – Hawk
      Mar 20 '14 at 12:00










    • $begingroup$
      How do you deduce that $a+bi$ is not prime from the UFD property of $mathbb{Z}[i]$?
      $endgroup$
      – Cary
      Sep 18 '16 at 15:59










    • $begingroup$
      @Cary, maybe it would be better to say that $a+bi$ and $c+di$ can't both be prime (in ${bf Z}[i]$), since that would give us two different prime factorizations of $p$. Then without loss of generality we may assume $a+bi$ is not prime.
      $endgroup$
      – Gerry Myerson
      Sep 18 '16 at 22:59










    • $begingroup$
      @GerryMyerson: if $p$ is an ordinary prime, then $p$ is either a Gauss prime or the product of a Gauss prime and its conjugate. Clearly, we are in the latter case. Can't we just say that if $p=(a+bi)(a-bi)=(c+di)(c-di)$ are two prime factorizations, then $a+bi=u(c+di)$ or $a+bi=u(c-di)$ for $u$ a unit. In either case, we have $(a,b)=(pm c, pm d)$ or $(a,b) = (pm d, pm c)$, which implies $a^2+b^2=c^2+d^2$?
      $endgroup$
      – Cary
      Sep 19 '16 at 7:08












    • $begingroup$
      @Cary, I was trying to do it using just the UFD property, and not the result about how rational primes factor in the Gaussian integers.
      $endgroup$
      – Gerry Myerson
      Sep 19 '16 at 7:13














    12












    12








    12





    $begingroup$

    The slickest way is via a little Algebraic Number Theory. If $p=a^2+b^2=c^2+d^2$ then $$p=(a+bi)(a-bi)=(c+di)(c-di)$$ Now ${bf Z}[i]$ is a unique factorization domain, so these two factorizations of $p$ show that $a+bi$ can't be a prime in ${bf Z}[i]$. We must have a non-trivial factorization $a+bi=(s+ti)(u+vi)$, whence $a-bi=(s-ti)(u-vi)$, and then $$p=(s^2+t^2)(u^2+v^2)$$ contradicting primality of $p$.



    There are ways to answer your question without these advanced concepts, but I can never remember how it's done. I'm sure someone else will.






    share|cite|improve this answer









    $endgroup$



    The slickest way is via a little Algebraic Number Theory. If $p=a^2+b^2=c^2+d^2$ then $$p=(a+bi)(a-bi)=(c+di)(c-di)$$ Now ${bf Z}[i]$ is a unique factorization domain, so these two factorizations of $p$ show that $a+bi$ can't be a prime in ${bf Z}[i]$. We must have a non-trivial factorization $a+bi=(s+ti)(u+vi)$, whence $a-bi=(s-ti)(u-vi)$, and then $$p=(s^2+t^2)(u^2+v^2)$$ contradicting primality of $p$.



    There are ways to answer your question without these advanced concepts, but I can never remember how it's done. I'm sure someone else will.







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Mar 20 '14 at 11:59









    Gerry MyersonGerry Myerson

    148k8152306




    148k8152306












    • $begingroup$
      Thanks for the approach...I will try to do something with this.
      $endgroup$
      – Hawk
      Mar 20 '14 at 12:00










    • $begingroup$
      How do you deduce that $a+bi$ is not prime from the UFD property of $mathbb{Z}[i]$?
      $endgroup$
      – Cary
      Sep 18 '16 at 15:59










    • $begingroup$
      @Cary, maybe it would be better to say that $a+bi$ and $c+di$ can't both be prime (in ${bf Z}[i]$), since that would give us two different prime factorizations of $p$. Then without loss of generality we may assume $a+bi$ is not prime.
      $endgroup$
      – Gerry Myerson
      Sep 18 '16 at 22:59










    • $begingroup$
      @GerryMyerson: if $p$ is an ordinary prime, then $p$ is either a Gauss prime or the product of a Gauss prime and its conjugate. Clearly, we are in the latter case. Can't we just say that if $p=(a+bi)(a-bi)=(c+di)(c-di)$ are two prime factorizations, then $a+bi=u(c+di)$ or $a+bi=u(c-di)$ for $u$ a unit. In either case, we have $(a,b)=(pm c, pm d)$ or $(a,b) = (pm d, pm c)$, which implies $a^2+b^2=c^2+d^2$?
      $endgroup$
      – Cary
      Sep 19 '16 at 7:08












    • $begingroup$
      @Cary, I was trying to do it using just the UFD property, and not the result about how rational primes factor in the Gaussian integers.
      $endgroup$
      – Gerry Myerson
      Sep 19 '16 at 7:13


















    • $begingroup$
      Thanks for the approach...I will try to do something with this.
      $endgroup$
      – Hawk
      Mar 20 '14 at 12:00










    • $begingroup$
      How do you deduce that $a+bi$ is not prime from the UFD property of $mathbb{Z}[i]$?
      $endgroup$
      – Cary
      Sep 18 '16 at 15:59










    • $begingroup$
      @Cary, maybe it would be better to say that $a+bi$ and $c+di$ can't both be prime (in ${bf Z}[i]$), since that would give us two different prime factorizations of $p$. Then without loss of generality we may assume $a+bi$ is not prime.
      $endgroup$
      – Gerry Myerson
      Sep 18 '16 at 22:59










    • $begingroup$
      @GerryMyerson: if $p$ is an ordinary prime, then $p$ is either a Gauss prime or the product of a Gauss prime and its conjugate. Clearly, we are in the latter case. Can't we just say that if $p=(a+bi)(a-bi)=(c+di)(c-di)$ are two prime factorizations, then $a+bi=u(c+di)$ or $a+bi=u(c-di)$ for $u$ a unit. In either case, we have $(a,b)=(pm c, pm d)$ or $(a,b) = (pm d, pm c)$, which implies $a^2+b^2=c^2+d^2$?
      $endgroup$
      – Cary
      Sep 19 '16 at 7:08












    • $begingroup$
      @Cary, I was trying to do it using just the UFD property, and not the result about how rational primes factor in the Gaussian integers.
      $endgroup$
      – Gerry Myerson
      Sep 19 '16 at 7:13
















    $begingroup$
    Thanks for the approach...I will try to do something with this.
    $endgroup$
    – Hawk
    Mar 20 '14 at 12:00




    $begingroup$
    Thanks for the approach...I will try to do something with this.
    $endgroup$
    – Hawk
    Mar 20 '14 at 12:00












    $begingroup$
    How do you deduce that $a+bi$ is not prime from the UFD property of $mathbb{Z}[i]$?
    $endgroup$
    – Cary
    Sep 18 '16 at 15:59




    $begingroup$
    How do you deduce that $a+bi$ is not prime from the UFD property of $mathbb{Z}[i]$?
    $endgroup$
    – Cary
    Sep 18 '16 at 15:59












    $begingroup$
    @Cary, maybe it would be better to say that $a+bi$ and $c+di$ can't both be prime (in ${bf Z}[i]$), since that would give us two different prime factorizations of $p$. Then without loss of generality we may assume $a+bi$ is not prime.
    $endgroup$
    – Gerry Myerson
    Sep 18 '16 at 22:59




    $begingroup$
    @Cary, maybe it would be better to say that $a+bi$ and $c+di$ can't both be prime (in ${bf Z}[i]$), since that would give us two different prime factorizations of $p$. Then without loss of generality we may assume $a+bi$ is not prime.
    $endgroup$
    – Gerry Myerson
    Sep 18 '16 at 22:59












    $begingroup$
    @GerryMyerson: if $p$ is an ordinary prime, then $p$ is either a Gauss prime or the product of a Gauss prime and its conjugate. Clearly, we are in the latter case. Can't we just say that if $p=(a+bi)(a-bi)=(c+di)(c-di)$ are two prime factorizations, then $a+bi=u(c+di)$ or $a+bi=u(c-di)$ for $u$ a unit. In either case, we have $(a,b)=(pm c, pm d)$ or $(a,b) = (pm d, pm c)$, which implies $a^2+b^2=c^2+d^2$?
    $endgroup$
    – Cary
    Sep 19 '16 at 7:08






    $begingroup$
    @GerryMyerson: if $p$ is an ordinary prime, then $p$ is either a Gauss prime or the product of a Gauss prime and its conjugate. Clearly, we are in the latter case. Can't we just say that if $p=(a+bi)(a-bi)=(c+di)(c-di)$ are two prime factorizations, then $a+bi=u(c+di)$ or $a+bi=u(c-di)$ for $u$ a unit. In either case, we have $(a,b)=(pm c, pm d)$ or $(a,b) = (pm d, pm c)$, which implies $a^2+b^2=c^2+d^2$?
    $endgroup$
    – Cary
    Sep 19 '16 at 7:08














    $begingroup$
    @Cary, I was trying to do it using just the UFD property, and not the result about how rational primes factor in the Gaussian integers.
    $endgroup$
    – Gerry Myerson
    Sep 19 '16 at 7:13




    $begingroup$
    @Cary, I was trying to do it using just the UFD property, and not the result about how rational primes factor in the Gaussian integers.
    $endgroup$
    – Gerry Myerson
    Sep 19 '16 at 7:13











    4












    $begingroup$

    Here's an answer without Algebraic Number Theory. I found it in Shanks, Solved and Unsolved Problems in Number Theory.



    Assume $$p=a^2+b^2=c^2+d^2tag1$$ with all variables positive integers. Then $$p^2=(a^2+b^2)(c^2+d^2)=a^2c^2+a^2d^2+b^2c^2+b^2d^2$$ and you can verify by just multiplying everything out that $$p^2=(ac+bd)^2+(ad-bc)^2tag2$$ and $$p^2=(ac-bd)^2+(ad+bc)^2tag3$$ By (1), we have $$(p-a^2)d^2=(p-c^2)b^2$$ which implies $$p(d^2-b^2)=(ad-bc)(ad+bc)tag4$$ From (4), $p$ divides $ad-bc$, or $p$ divides $ad+bc$. If $p$ divides $ad-bc$, then from (2) we get $ad-bc=0$, so $d^2-b^2=0$, so $b=d$. If $p$ divides $ad+bc$, then from (3) we get $ac=bd$. Now $a$ and $b$ are relatively prime, so $a$ divides $d$, and $b$ divides $c$. Then by (1) we have $a=d$, and we have proved that the two representations of $p$ are the same.



    This is probably something like what @Konstantinos was getting at in his answer.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      Just noting that $(a^2+b^2)(c^2+d^2)=(ac+bd)^2+(ad-bc)^2=(ac-bd)^2+(ad+bc)^2$ states that if a number is the product of two sums of squares,then the number can also be written as the sum of two squares.This is the sum of squares identity of Diophantus.
      $endgroup$
      – rah4927
      Mar 21 '14 at 9:11


















    4












    $begingroup$

    Here's an answer without Algebraic Number Theory. I found it in Shanks, Solved and Unsolved Problems in Number Theory.



    Assume $$p=a^2+b^2=c^2+d^2tag1$$ with all variables positive integers. Then $$p^2=(a^2+b^2)(c^2+d^2)=a^2c^2+a^2d^2+b^2c^2+b^2d^2$$ and you can verify by just multiplying everything out that $$p^2=(ac+bd)^2+(ad-bc)^2tag2$$ and $$p^2=(ac-bd)^2+(ad+bc)^2tag3$$ By (1), we have $$(p-a^2)d^2=(p-c^2)b^2$$ which implies $$p(d^2-b^2)=(ad-bc)(ad+bc)tag4$$ From (4), $p$ divides $ad-bc$, or $p$ divides $ad+bc$. If $p$ divides $ad-bc$, then from (2) we get $ad-bc=0$, so $d^2-b^2=0$, so $b=d$. If $p$ divides $ad+bc$, then from (3) we get $ac=bd$. Now $a$ and $b$ are relatively prime, so $a$ divides $d$, and $b$ divides $c$. Then by (1) we have $a=d$, and we have proved that the two representations of $p$ are the same.



    This is probably something like what @Konstantinos was getting at in his answer.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      Just noting that $(a^2+b^2)(c^2+d^2)=(ac+bd)^2+(ad-bc)^2=(ac-bd)^2+(ad+bc)^2$ states that if a number is the product of two sums of squares,then the number can also be written as the sum of two squares.This is the sum of squares identity of Diophantus.
      $endgroup$
      – rah4927
      Mar 21 '14 at 9:11
















    4












    4








    4





    $begingroup$

    Here's an answer without Algebraic Number Theory. I found it in Shanks, Solved and Unsolved Problems in Number Theory.



    Assume $$p=a^2+b^2=c^2+d^2tag1$$ with all variables positive integers. Then $$p^2=(a^2+b^2)(c^2+d^2)=a^2c^2+a^2d^2+b^2c^2+b^2d^2$$ and you can verify by just multiplying everything out that $$p^2=(ac+bd)^2+(ad-bc)^2tag2$$ and $$p^2=(ac-bd)^2+(ad+bc)^2tag3$$ By (1), we have $$(p-a^2)d^2=(p-c^2)b^2$$ which implies $$p(d^2-b^2)=(ad-bc)(ad+bc)tag4$$ From (4), $p$ divides $ad-bc$, or $p$ divides $ad+bc$. If $p$ divides $ad-bc$, then from (2) we get $ad-bc=0$, so $d^2-b^2=0$, so $b=d$. If $p$ divides $ad+bc$, then from (3) we get $ac=bd$. Now $a$ and $b$ are relatively prime, so $a$ divides $d$, and $b$ divides $c$. Then by (1) we have $a=d$, and we have proved that the two representations of $p$ are the same.



    This is probably something like what @Konstantinos was getting at in his answer.






    share|cite|improve this answer









    $endgroup$



    Here's an answer without Algebraic Number Theory. I found it in Shanks, Solved and Unsolved Problems in Number Theory.



    Assume $$p=a^2+b^2=c^2+d^2tag1$$ with all variables positive integers. Then $$p^2=(a^2+b^2)(c^2+d^2)=a^2c^2+a^2d^2+b^2c^2+b^2d^2$$ and you can verify by just multiplying everything out that $$p^2=(ac+bd)^2+(ad-bc)^2tag2$$ and $$p^2=(ac-bd)^2+(ad+bc)^2tag3$$ By (1), we have $$(p-a^2)d^2=(p-c^2)b^2$$ which implies $$p(d^2-b^2)=(ad-bc)(ad+bc)tag4$$ From (4), $p$ divides $ad-bc$, or $p$ divides $ad+bc$. If $p$ divides $ad-bc$, then from (2) we get $ad-bc=0$, so $d^2-b^2=0$, so $b=d$. If $p$ divides $ad+bc$, then from (3) we get $ac=bd$. Now $a$ and $b$ are relatively prime, so $a$ divides $d$, and $b$ divides $c$. Then by (1) we have $a=d$, and we have proved that the two representations of $p$ are the same.



    This is probably something like what @Konstantinos was getting at in his answer.







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Mar 21 '14 at 3:54









    Gerry MyersonGerry Myerson

    148k8152306




    148k8152306












    • $begingroup$
      Just noting that $(a^2+b^2)(c^2+d^2)=(ac+bd)^2+(ad-bc)^2=(ac-bd)^2+(ad+bc)^2$ states that if a number is the product of two sums of squares,then the number can also be written as the sum of two squares.This is the sum of squares identity of Diophantus.
      $endgroup$
      – rah4927
      Mar 21 '14 at 9:11




















    • $begingroup$
      Just noting that $(a^2+b^2)(c^2+d^2)=(ac+bd)^2+(ad-bc)^2=(ac-bd)^2+(ad+bc)^2$ states that if a number is the product of two sums of squares,then the number can also be written as the sum of two squares.This is the sum of squares identity of Diophantus.
      $endgroup$
      – rah4927
      Mar 21 '14 at 9:11


















    $begingroup$
    Just noting that $(a^2+b^2)(c^2+d^2)=(ac+bd)^2+(ad-bc)^2=(ac-bd)^2+(ad+bc)^2$ states that if a number is the product of two sums of squares,then the number can also be written as the sum of two squares.This is the sum of squares identity of Diophantus.
    $endgroup$
    – rah4927
    Mar 21 '14 at 9:11






    $begingroup$
    Just noting that $(a^2+b^2)(c^2+d^2)=(ac+bd)^2+(ad-bc)^2=(ac-bd)^2+(ad+bc)^2$ states that if a number is the product of two sums of squares,then the number can also be written as the sum of two squares.This is the sum of squares identity of Diophantus.
    $endgroup$
    – rah4927
    Mar 21 '14 at 9:11













    0












    $begingroup$

    The problem is trivialized if you are given that $x^2+y^2=n$ has $r_2(n)=4sum_{d|n} sin(pi d/2) $ solutions in the integers.



    The number of ways $r_2(p)=4sum_{d|p} sin(frac{pi d}{2})=4(1+sin(pi p/2))$.



    If $sin(pi p /2)=1$ then there are 8 solution in the integers. Namely, $(pm a,pm b)$ and $(pm b, pm a)$ satisfy $x^2+y^2=p$ where $aneq b$. There is another way one might imagine $8$ solutions: $(0,pm a),(pm a,0)$ and $(pm b,pm b)$ but this cannot happen because it would mean that $p$ is a perfect square and therefore not prime.



    If $sin(pi p /2)=-1$ then we cannot write $p$ as the sum of squares.



    $If sin(pi p /2)=0$ then $p=2$.






    share|cite|improve this answer











    $endgroup$


















      0












      $begingroup$

      The problem is trivialized if you are given that $x^2+y^2=n$ has $r_2(n)=4sum_{d|n} sin(pi d/2) $ solutions in the integers.



      The number of ways $r_2(p)=4sum_{d|p} sin(frac{pi d}{2})=4(1+sin(pi p/2))$.



      If $sin(pi p /2)=1$ then there are 8 solution in the integers. Namely, $(pm a,pm b)$ and $(pm b, pm a)$ satisfy $x^2+y^2=p$ where $aneq b$. There is another way one might imagine $8$ solutions: $(0,pm a),(pm a,0)$ and $(pm b,pm b)$ but this cannot happen because it would mean that $p$ is a perfect square and therefore not prime.



      If $sin(pi p /2)=-1$ then we cannot write $p$ as the sum of squares.



      $If sin(pi p /2)=0$ then $p=2$.






      share|cite|improve this answer











      $endgroup$
















        0












        0








        0





        $begingroup$

        The problem is trivialized if you are given that $x^2+y^2=n$ has $r_2(n)=4sum_{d|n} sin(pi d/2) $ solutions in the integers.



        The number of ways $r_2(p)=4sum_{d|p} sin(frac{pi d}{2})=4(1+sin(pi p/2))$.



        If $sin(pi p /2)=1$ then there are 8 solution in the integers. Namely, $(pm a,pm b)$ and $(pm b, pm a)$ satisfy $x^2+y^2=p$ where $aneq b$. There is another way one might imagine $8$ solutions: $(0,pm a),(pm a,0)$ and $(pm b,pm b)$ but this cannot happen because it would mean that $p$ is a perfect square and therefore not prime.



        If $sin(pi p /2)=-1$ then we cannot write $p$ as the sum of squares.



        $If sin(pi p /2)=0$ then $p=2$.






        share|cite|improve this answer











        $endgroup$



        The problem is trivialized if you are given that $x^2+y^2=n$ has $r_2(n)=4sum_{d|n} sin(pi d/2) $ solutions in the integers.



        The number of ways $r_2(p)=4sum_{d|p} sin(frac{pi d}{2})=4(1+sin(pi p/2))$.



        If $sin(pi p /2)=1$ then there are 8 solution in the integers. Namely, $(pm a,pm b)$ and $(pm b, pm a)$ satisfy $x^2+y^2=p$ where $aneq b$. There is another way one might imagine $8$ solutions: $(0,pm a),(pm a,0)$ and $(pm b,pm b)$ but this cannot happen because it would mean that $p$ is a perfect square and therefore not prime.



        If $sin(pi p /2)=-1$ then we cannot write $p$ as the sum of squares.



        $If sin(pi p /2)=0$ then $p=2$.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Dec 28 '18 at 17:36

























        answered Dec 28 '18 at 16:59









        MasonMason

        1,7841730




        1,7841730























            -1












            $begingroup$

            If $p=a^2+b^2=c^2+d^2$ then $$p=frac{(ac+bd)(ac-bd)}{(a+d)(a-d)}$$






            share|cite|improve this answer









            $endgroup$









            • 3




              $begingroup$
              How is that supposed to help?
              $endgroup$
              – Hawk
              Mar 20 '14 at 17:48










            • $begingroup$
              It is a contradiction this shows that $p$ must be composite.Maybe i will edit it later when i will have time!
              $endgroup$
              – Konstantinos Gaitanas
              Mar 20 '14 at 18:01
















            -1












            $begingroup$

            If $p=a^2+b^2=c^2+d^2$ then $$p=frac{(ac+bd)(ac-bd)}{(a+d)(a-d)}$$






            share|cite|improve this answer









            $endgroup$









            • 3




              $begingroup$
              How is that supposed to help?
              $endgroup$
              – Hawk
              Mar 20 '14 at 17:48










            • $begingroup$
              It is a contradiction this shows that $p$ must be composite.Maybe i will edit it later when i will have time!
              $endgroup$
              – Konstantinos Gaitanas
              Mar 20 '14 at 18:01














            -1












            -1








            -1





            $begingroup$

            If $p=a^2+b^2=c^2+d^2$ then $$p=frac{(ac+bd)(ac-bd)}{(a+d)(a-d)}$$






            share|cite|improve this answer









            $endgroup$



            If $p=a^2+b^2=c^2+d^2$ then $$p=frac{(ac+bd)(ac-bd)}{(a+d)(a-d)}$$







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Mar 20 '14 at 13:41









            Konstantinos GaitanasKonstantinos Gaitanas

            6,79931938




            6,79931938








            • 3




              $begingroup$
              How is that supposed to help?
              $endgroup$
              – Hawk
              Mar 20 '14 at 17:48










            • $begingroup$
              It is a contradiction this shows that $p$ must be composite.Maybe i will edit it later when i will have time!
              $endgroup$
              – Konstantinos Gaitanas
              Mar 20 '14 at 18:01














            • 3




              $begingroup$
              How is that supposed to help?
              $endgroup$
              – Hawk
              Mar 20 '14 at 17:48










            • $begingroup$
              It is a contradiction this shows that $p$ must be composite.Maybe i will edit it later when i will have time!
              $endgroup$
              – Konstantinos Gaitanas
              Mar 20 '14 at 18:01








            3




            3




            $begingroup$
            How is that supposed to help?
            $endgroup$
            – Hawk
            Mar 20 '14 at 17:48




            $begingroup$
            How is that supposed to help?
            $endgroup$
            – Hawk
            Mar 20 '14 at 17:48












            $begingroup$
            It is a contradiction this shows that $p$ must be composite.Maybe i will edit it later when i will have time!
            $endgroup$
            – Konstantinos Gaitanas
            Mar 20 '14 at 18:01




            $begingroup$
            It is a contradiction this shows that $p$ must be composite.Maybe i will edit it later when i will have time!
            $endgroup$
            – Konstantinos Gaitanas
            Mar 20 '14 at 18:01


















            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%2f719700%2fif-a-prime-can-be-expressed-as-sum-of-square-of-two-integers-then-prove-that-th%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

            How to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Can I use Tabulator js library in my java Spring + Thymeleaf project?