Pythagorean like Diophantine Equation












0












$begingroup$


I am trying to solve this problem.
http://www.javaist.com/rosecode/problem-527-1-2-3-type-Pythagorean-triangles-askyear-2018



Here we have to find all positive integral solution of $a^2+2b^2=3c^2$ where $a+b+cle N$. In the question, $N=25000000$.



My first approach was to loop over $a$ and for fixed value of $a$ find the solutions of $3c^2-2b^2=a^2$ using LMM algorithm (https://thilinaatsympy.wordpress.com/2013/07/06/solving-the-generalized-pell-equation/). But this is very slow. I am unable to find a faster method. Any help will be appreciated.










share|cite|improve this question









$endgroup$












  • $begingroup$
    math.stackexchange.com/questions/2773097/…
    $endgroup$
    – individ
    Dec 10 '18 at 13:14










  • $begingroup$
    This doesn't give all the solutions.
    $endgroup$
    – Asif
    Dec 11 '18 at 6:02










  • $begingroup$
    Gives all solutions. It is necessary to accurately and attentively all to write down. Although you can write such a simple solution. $$a^2+2b^2=3c^2$$ $$a=p^2+6ps+3s^2$$ $$b=p^2-3s^2$$ $$c=p^2+2ps+3s^2$$
    $endgroup$
    – individ
    Dec 11 '18 at 6:41












  • $begingroup$
    I am not sure how you arrived at this parametric solution, but it certainly doesn't give all the solutions and also produces lots of negative integer solutions, which aren't necessary.
    $endgroup$
    – Asif
    Dec 11 '18 at 16:22










  • $begingroup$
    Rewrite the negative into a positive solution. You want to get a solution what you like, not a solution to the problem. That's not how math works. We may not like the answer, but the solution is the solution.
    $endgroup$
    – individ
    Dec 11 '18 at 16:37
















0












$begingroup$


I am trying to solve this problem.
http://www.javaist.com/rosecode/problem-527-1-2-3-type-Pythagorean-triangles-askyear-2018



Here we have to find all positive integral solution of $a^2+2b^2=3c^2$ where $a+b+cle N$. In the question, $N=25000000$.



My first approach was to loop over $a$ and for fixed value of $a$ find the solutions of $3c^2-2b^2=a^2$ using LMM algorithm (https://thilinaatsympy.wordpress.com/2013/07/06/solving-the-generalized-pell-equation/). But this is very slow. I am unable to find a faster method. Any help will be appreciated.










share|cite|improve this question









$endgroup$












  • $begingroup$
    math.stackexchange.com/questions/2773097/…
    $endgroup$
    – individ
    Dec 10 '18 at 13:14










  • $begingroup$
    This doesn't give all the solutions.
    $endgroup$
    – Asif
    Dec 11 '18 at 6:02










  • $begingroup$
    Gives all solutions. It is necessary to accurately and attentively all to write down. Although you can write such a simple solution. $$a^2+2b^2=3c^2$$ $$a=p^2+6ps+3s^2$$ $$b=p^2-3s^2$$ $$c=p^2+2ps+3s^2$$
    $endgroup$
    – individ
    Dec 11 '18 at 6:41












  • $begingroup$
    I am not sure how you arrived at this parametric solution, but it certainly doesn't give all the solutions and also produces lots of negative integer solutions, which aren't necessary.
    $endgroup$
    – Asif
    Dec 11 '18 at 16:22










  • $begingroup$
    Rewrite the negative into a positive solution. You want to get a solution what you like, not a solution to the problem. That's not how math works. We may not like the answer, but the solution is the solution.
    $endgroup$
    – individ
    Dec 11 '18 at 16:37














0












0








0


1



$begingroup$


I am trying to solve this problem.
http://www.javaist.com/rosecode/problem-527-1-2-3-type-Pythagorean-triangles-askyear-2018



Here we have to find all positive integral solution of $a^2+2b^2=3c^2$ where $a+b+cle N$. In the question, $N=25000000$.



My first approach was to loop over $a$ and for fixed value of $a$ find the solutions of $3c^2-2b^2=a^2$ using LMM algorithm (https://thilinaatsympy.wordpress.com/2013/07/06/solving-the-generalized-pell-equation/). But this is very slow. I am unable to find a faster method. Any help will be appreciated.










share|cite|improve this question









$endgroup$




I am trying to solve this problem.
http://www.javaist.com/rosecode/problem-527-1-2-3-type-Pythagorean-triangles-askyear-2018



Here we have to find all positive integral solution of $a^2+2b^2=3c^2$ where $a+b+cle N$. In the question, $N=25000000$.



My first approach was to loop over $a$ and for fixed value of $a$ find the solutions of $3c^2-2b^2=a^2$ using LMM algorithm (https://thilinaatsympy.wordpress.com/2013/07/06/solving-the-generalized-pell-equation/). But this is very slow. I am unable to find a faster method. Any help will be appreciated.







number-theory diophantine-equations pythagorean-triples






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 10 '18 at 11:37









AsifAsif

1069




1069












  • $begingroup$
    math.stackexchange.com/questions/2773097/…
    $endgroup$
    – individ
    Dec 10 '18 at 13:14










  • $begingroup$
    This doesn't give all the solutions.
    $endgroup$
    – Asif
    Dec 11 '18 at 6:02










  • $begingroup$
    Gives all solutions. It is necessary to accurately and attentively all to write down. Although you can write such a simple solution. $$a^2+2b^2=3c^2$$ $$a=p^2+6ps+3s^2$$ $$b=p^2-3s^2$$ $$c=p^2+2ps+3s^2$$
    $endgroup$
    – individ
    Dec 11 '18 at 6:41












  • $begingroup$
    I am not sure how you arrived at this parametric solution, but it certainly doesn't give all the solutions and also produces lots of negative integer solutions, which aren't necessary.
    $endgroup$
    – Asif
    Dec 11 '18 at 16:22










  • $begingroup$
    Rewrite the negative into a positive solution. You want to get a solution what you like, not a solution to the problem. That's not how math works. We may not like the answer, but the solution is the solution.
    $endgroup$
    – individ
    Dec 11 '18 at 16:37


















  • $begingroup$
    math.stackexchange.com/questions/2773097/…
    $endgroup$
    – individ
    Dec 10 '18 at 13:14










  • $begingroup$
    This doesn't give all the solutions.
    $endgroup$
    – Asif
    Dec 11 '18 at 6:02










  • $begingroup$
    Gives all solutions. It is necessary to accurately and attentively all to write down. Although you can write such a simple solution. $$a^2+2b^2=3c^2$$ $$a=p^2+6ps+3s^2$$ $$b=p^2-3s^2$$ $$c=p^2+2ps+3s^2$$
    $endgroup$
    – individ
    Dec 11 '18 at 6:41












  • $begingroup$
    I am not sure how you arrived at this parametric solution, but it certainly doesn't give all the solutions and also produces lots of negative integer solutions, which aren't necessary.
    $endgroup$
    – Asif
    Dec 11 '18 at 16:22










  • $begingroup$
    Rewrite the negative into a positive solution. You want to get a solution what you like, not a solution to the problem. That's not how math works. We may not like the answer, but the solution is the solution.
    $endgroup$
    – individ
    Dec 11 '18 at 16:37
















$begingroup$
math.stackexchange.com/questions/2773097/…
$endgroup$
– individ
Dec 10 '18 at 13:14




$begingroup$
math.stackexchange.com/questions/2773097/…
$endgroup$
– individ
Dec 10 '18 at 13:14












$begingroup$
This doesn't give all the solutions.
$endgroup$
– Asif
Dec 11 '18 at 6:02




$begingroup$
This doesn't give all the solutions.
$endgroup$
– Asif
Dec 11 '18 at 6:02












$begingroup$
Gives all solutions. It is necessary to accurately and attentively all to write down. Although you can write such a simple solution. $$a^2+2b^2=3c^2$$ $$a=p^2+6ps+3s^2$$ $$b=p^2-3s^2$$ $$c=p^2+2ps+3s^2$$
$endgroup$
– individ
Dec 11 '18 at 6:41






$begingroup$
Gives all solutions. It is necessary to accurately and attentively all to write down. Although you can write such a simple solution. $$a^2+2b^2=3c^2$$ $$a=p^2+6ps+3s^2$$ $$b=p^2-3s^2$$ $$c=p^2+2ps+3s^2$$
$endgroup$
– individ
Dec 11 '18 at 6:41














$begingroup$
I am not sure how you arrived at this parametric solution, but it certainly doesn't give all the solutions and also produces lots of negative integer solutions, which aren't necessary.
$endgroup$
– Asif
Dec 11 '18 at 16:22




$begingroup$
I am not sure how you arrived at this parametric solution, but it certainly doesn't give all the solutions and also produces lots of negative integer solutions, which aren't necessary.
$endgroup$
– Asif
Dec 11 '18 at 16:22












$begingroup$
Rewrite the negative into a positive solution. You want to get a solution what you like, not a solution to the problem. That's not how math works. We may not like the answer, but the solution is the solution.
$endgroup$
– individ
Dec 11 '18 at 16:37




$begingroup$
Rewrite the negative into a positive solution. You want to get a solution what you like, not a solution to the problem. That's not how math works. We may not like the answer, but the solution is the solution.
$endgroup$
– individ
Dec 11 '18 at 16:37










3 Answers
3






active

oldest

votes


















0












$begingroup$

Above equation shown below has parametric solution:



$a^2+2b^2=3c^2$



$(a,b,c)=((3k^2-6k-5),(3k^2+6k-1),(3k^2+2k+3))$



For $k=4$ we get:



$(a,b,c)=(5,13,11)$






share|cite|improve this answer









$endgroup$





















    0












    $begingroup$

    If we use Pythagorean triples we have:



    $(m^2-n^2)^2+(2 mn)^2=(m^2-n^2)^2$



    $(m^2+n^2)^2-(m^2-n^2)^2=(2mn)^2=2(2m^2n^2)$



    Here $a=m^2+n^2$, $c=m^2-n^2$



    Now we rearrange the equation as:



    $a^2-c^2=2(c^2-b^2)$



    Comparing these relations means:



    $c^2-b^2=2m^2n^2$



    $2m^2n^2=(m^2-n^2)^2-b^2$



    $b^2=m^4+n^4-4m^2n^2$



    For example with $m=2$ and $n=1$ we have:



    $a=2^2+1^2=5$, $c=2^2-1^2=3$ and:



    $b^2=2^4+1^4-4times2^2times1^2=1$ or $b=1$



    and we have:



    $5^2+2times1^2=3times3^2$



    This is primitive solution and subsequent solutions can be found by multiplying both sides of this relation by a number like $n^2$:



    $(5n)^2+2(n)^2=(3n)^2$



    $a+b+c<=25000000$



    $5n+n+3n=9n<=25000000$



    $n<=2777777$



    This gives a set of solutions. Also $a=b=c=1$ is a primitives solution which gives another set of solutions. It is not known if the parametric formula for $b$ gives more integer solutions for b; if it does there will be more primitive solutions and thereby more solutions.






    share|cite|improve this answer









    $endgroup$





















      0












      $begingroup$

      $$(2 a^2 - 3 b^2)^2 + 2 (2 a^2 + 3 b^2 - 6 a b)^2 = 3 (2 a^2 + 3 b^2 - 4 a b)^2$$
      $$(a^2 - 6 b^2)^2 + 2 (a^2 + 6 b^2 - 6 a b)^2 = 3 (a^2 + 6 b^2 - 4 a b)^2$$






      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%2f3033802%2fpythagorean-like-diophantine-equation%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









        0












        $begingroup$

        Above equation shown below has parametric solution:



        $a^2+2b^2=3c^2$



        $(a,b,c)=((3k^2-6k-5),(3k^2+6k-1),(3k^2+2k+3))$



        For $k=4$ we get:



        $(a,b,c)=(5,13,11)$






        share|cite|improve this answer









        $endgroup$


















          0












          $begingroup$

          Above equation shown below has parametric solution:



          $a^2+2b^2=3c^2$



          $(a,b,c)=((3k^2-6k-5),(3k^2+6k-1),(3k^2+2k+3))$



          For $k=4$ we get:



          $(a,b,c)=(5,13,11)$






          share|cite|improve this answer









          $endgroup$
















            0












            0








            0





            $begingroup$

            Above equation shown below has parametric solution:



            $a^2+2b^2=3c^2$



            $(a,b,c)=((3k^2-6k-5),(3k^2+6k-1),(3k^2+2k+3))$



            For $k=4$ we get:



            $(a,b,c)=(5,13,11)$






            share|cite|improve this answer









            $endgroup$



            Above equation shown below has parametric solution:



            $a^2+2b^2=3c^2$



            $(a,b,c)=((3k^2-6k-5),(3k^2+6k-1),(3k^2+2k+3))$



            For $k=4$ we get:



            $(a,b,c)=(5,13,11)$







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Dec 10 '18 at 13:11









            SamSam

            1




            1























                0












                $begingroup$

                If we use Pythagorean triples we have:



                $(m^2-n^2)^2+(2 mn)^2=(m^2-n^2)^2$



                $(m^2+n^2)^2-(m^2-n^2)^2=(2mn)^2=2(2m^2n^2)$



                Here $a=m^2+n^2$, $c=m^2-n^2$



                Now we rearrange the equation as:



                $a^2-c^2=2(c^2-b^2)$



                Comparing these relations means:



                $c^2-b^2=2m^2n^2$



                $2m^2n^2=(m^2-n^2)^2-b^2$



                $b^2=m^4+n^4-4m^2n^2$



                For example with $m=2$ and $n=1$ we have:



                $a=2^2+1^2=5$, $c=2^2-1^2=3$ and:



                $b^2=2^4+1^4-4times2^2times1^2=1$ or $b=1$



                and we have:



                $5^2+2times1^2=3times3^2$



                This is primitive solution and subsequent solutions can be found by multiplying both sides of this relation by a number like $n^2$:



                $(5n)^2+2(n)^2=(3n)^2$



                $a+b+c<=25000000$



                $5n+n+3n=9n<=25000000$



                $n<=2777777$



                This gives a set of solutions. Also $a=b=c=1$ is a primitives solution which gives another set of solutions. It is not known if the parametric formula for $b$ gives more integer solutions for b; if it does there will be more primitive solutions and thereby more solutions.






                share|cite|improve this answer









                $endgroup$


















                  0












                  $begingroup$

                  If we use Pythagorean triples we have:



                  $(m^2-n^2)^2+(2 mn)^2=(m^2-n^2)^2$



                  $(m^2+n^2)^2-(m^2-n^2)^2=(2mn)^2=2(2m^2n^2)$



                  Here $a=m^2+n^2$, $c=m^2-n^2$



                  Now we rearrange the equation as:



                  $a^2-c^2=2(c^2-b^2)$



                  Comparing these relations means:



                  $c^2-b^2=2m^2n^2$



                  $2m^2n^2=(m^2-n^2)^2-b^2$



                  $b^2=m^4+n^4-4m^2n^2$



                  For example with $m=2$ and $n=1$ we have:



                  $a=2^2+1^2=5$, $c=2^2-1^2=3$ and:



                  $b^2=2^4+1^4-4times2^2times1^2=1$ or $b=1$



                  and we have:



                  $5^2+2times1^2=3times3^2$



                  This is primitive solution and subsequent solutions can be found by multiplying both sides of this relation by a number like $n^2$:



                  $(5n)^2+2(n)^2=(3n)^2$



                  $a+b+c<=25000000$



                  $5n+n+3n=9n<=25000000$



                  $n<=2777777$



                  This gives a set of solutions. Also $a=b=c=1$ is a primitives solution which gives another set of solutions. It is not known if the parametric formula for $b$ gives more integer solutions for b; if it does there will be more primitive solutions and thereby more solutions.






                  share|cite|improve this answer









                  $endgroup$
















                    0












                    0








                    0





                    $begingroup$

                    If we use Pythagorean triples we have:



                    $(m^2-n^2)^2+(2 mn)^2=(m^2-n^2)^2$



                    $(m^2+n^2)^2-(m^2-n^2)^2=(2mn)^2=2(2m^2n^2)$



                    Here $a=m^2+n^2$, $c=m^2-n^2$



                    Now we rearrange the equation as:



                    $a^2-c^2=2(c^2-b^2)$



                    Comparing these relations means:



                    $c^2-b^2=2m^2n^2$



                    $2m^2n^2=(m^2-n^2)^2-b^2$



                    $b^2=m^4+n^4-4m^2n^2$



                    For example with $m=2$ and $n=1$ we have:



                    $a=2^2+1^2=5$, $c=2^2-1^2=3$ and:



                    $b^2=2^4+1^4-4times2^2times1^2=1$ or $b=1$



                    and we have:



                    $5^2+2times1^2=3times3^2$



                    This is primitive solution and subsequent solutions can be found by multiplying both sides of this relation by a number like $n^2$:



                    $(5n)^2+2(n)^2=(3n)^2$



                    $a+b+c<=25000000$



                    $5n+n+3n=9n<=25000000$



                    $n<=2777777$



                    This gives a set of solutions. Also $a=b=c=1$ is a primitives solution which gives another set of solutions. It is not known if the parametric formula for $b$ gives more integer solutions for b; if it does there will be more primitive solutions and thereby more solutions.






                    share|cite|improve this answer









                    $endgroup$



                    If we use Pythagorean triples we have:



                    $(m^2-n^2)^2+(2 mn)^2=(m^2-n^2)^2$



                    $(m^2+n^2)^2-(m^2-n^2)^2=(2mn)^2=2(2m^2n^2)$



                    Here $a=m^2+n^2$, $c=m^2-n^2$



                    Now we rearrange the equation as:



                    $a^2-c^2=2(c^2-b^2)$



                    Comparing these relations means:



                    $c^2-b^2=2m^2n^2$



                    $2m^2n^2=(m^2-n^2)^2-b^2$



                    $b^2=m^4+n^4-4m^2n^2$



                    For example with $m=2$ and $n=1$ we have:



                    $a=2^2+1^2=5$, $c=2^2-1^2=3$ and:



                    $b^2=2^4+1^4-4times2^2times1^2=1$ or $b=1$



                    and we have:



                    $5^2+2times1^2=3times3^2$



                    This is primitive solution and subsequent solutions can be found by multiplying both sides of this relation by a number like $n^2$:



                    $(5n)^2+2(n)^2=(3n)^2$



                    $a+b+c<=25000000$



                    $5n+n+3n=9n<=25000000$



                    $n<=2777777$



                    This gives a set of solutions. Also $a=b=c=1$ is a primitives solution which gives another set of solutions. It is not known if the parametric formula for $b$ gives more integer solutions for b; if it does there will be more primitive solutions and thereby more solutions.







                    share|cite|improve this answer












                    share|cite|improve this answer



                    share|cite|improve this answer










                    answered Dec 10 '18 at 14:55









                    siroussirous

                    1,6391513




                    1,6391513























                        0












                        $begingroup$

                        $$(2 a^2 - 3 b^2)^2 + 2 (2 a^2 + 3 b^2 - 6 a b)^2 = 3 (2 a^2 + 3 b^2 - 4 a b)^2$$
                        $$(a^2 - 6 b^2)^2 + 2 (a^2 + 6 b^2 - 6 a b)^2 = 3 (a^2 + 6 b^2 - 4 a b)^2$$






                        share|cite|improve this answer









                        $endgroup$


















                          0












                          $begingroup$

                          $$(2 a^2 - 3 b^2)^2 + 2 (2 a^2 + 3 b^2 - 6 a b)^2 = 3 (2 a^2 + 3 b^2 - 4 a b)^2$$
                          $$(a^2 - 6 b^2)^2 + 2 (a^2 + 6 b^2 - 6 a b)^2 = 3 (a^2 + 6 b^2 - 4 a b)^2$$






                          share|cite|improve this answer









                          $endgroup$
















                            0












                            0








                            0





                            $begingroup$

                            $$(2 a^2 - 3 b^2)^2 + 2 (2 a^2 + 3 b^2 - 6 a b)^2 = 3 (2 a^2 + 3 b^2 - 4 a b)^2$$
                            $$(a^2 - 6 b^2)^2 + 2 (a^2 + 6 b^2 - 6 a b)^2 = 3 (a^2 + 6 b^2 - 4 a b)^2$$






                            share|cite|improve this answer









                            $endgroup$



                            $$(2 a^2 - 3 b^2)^2 + 2 (2 a^2 + 3 b^2 - 6 a b)^2 = 3 (2 a^2 + 3 b^2 - 4 a b)^2$$
                            $$(a^2 - 6 b^2)^2 + 2 (a^2 + 6 b^2 - 6 a b)^2 = 3 (a^2 + 6 b^2 - 4 a b)^2$$







                            share|cite|improve this answer












                            share|cite|improve this answer



                            share|cite|improve this answer










                            answered Dec 11 '18 at 10:07









                            S. I.S. I.

                            112




                            112






























                                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%2f3033802%2fpythagorean-like-diophantine-equation%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

                                Tonle Sap (See)

                                I get strange results when I access the Sqlitedatabase with Unity C# via XAMPP

                                Guatemaltekische Davis-Cup-Mannschaft