Valid term from quadratic sequence?Fibonacci function or sequenceSylvester's sequenceThe Squaring SequenceYet Unused PairsThe lowest initial numbers in a Fibonacci-like sequenceReconstruct an arithmetic sequenceCollection from a sequence that constitute a perfect squareFind Integral Roots of A PolynomialGenerate lowest degree polynomial from sequenceThe Written Digits Sequence

Should I tell management that I intend to leave due to bad software development practices?

Im going to France and my passport expires June 19th

How does a predictive coding aid in lossless compression?

Method Does Not Exist error message

How would I stat a creature to be immune to everything but the Magic Missile spell? (just for fun)

Is this a hacking script in function.php?

What's the in-universe reasoning behind sorcerers needing material components?

Examples of smooth manifolds admitting inbetween one and a continuum of complex structures

Why no variance term in Bayesian logistic regression?

Valid term from quadratic sequence?

How dangerous is XSS?

Arrow those variables!

Should I cover my bicycle overnight while bikepacking?

How do I deal with an unproductive colleague in a small company?

Intersection Puzzle

Could the museum Saturn V's be refitted for one more flight?

What mechanic is there to disable a threat instead of killing it?

How could indestructible materials be used in power generation?

Bullying boss launched a smear campaign and made me unemployable

Why can't we play rap on piano?

What killed these X2 caps?

Alternative to sending password over mail?

Do scales need to be in alphabetical order?

Why is this clock signal connected to a capacitor to gnd?



Valid term from quadratic sequence?


Fibonacci function or sequenceSylvester's sequenceThe Squaring SequenceYet Unused PairsThe lowest initial numbers in a Fibonacci-like sequenceReconstruct an arithmetic sequenceCollection from a sequence that constitute a perfect squareFind Integral Roots of A PolynomialGenerate lowest degree polynomial from sequenceThe Written Digits Sequence













7












$begingroup$


You are given four numbers. The first three are $a$, $b$, and $c$ respectively, for the sequence:



$$T_n=an^2+bn+c$$



You may take input of these four numbers in any way. The output should be one of two distinct outputs mentioned in your answer, one means that the fourth number is a term in the sequence (the above equation has at least one solution for $n$ which is an integer when $a$, $b$, $c$ and $T_n$ are substituted for the given values), the other means the opposite.



This is code golf, so the shortest answer in bytes wins. Your program should work for any input of $a, b, c, T_n$ where the numbers are negative or positive (or 0), decimal or integer. To avoid problems but keep some complexity, non-integers will always just end in $.5$. Standard loop-holes disallowed.



Test cases



a |b |c |T_n |Y/N
------------------------
1 |1 |1 |1 |Y #n=0
2 |3 |5 |2 |N
0.5 |1 |-2 |-0.5|Y #n=1
0.5 |1 |-2 |15.5|Y #n=5
0.5 |1 |-2 |3 |N
-3.5|2 |-6 |-934|Y #n=-16
0 |1 |4 |7 |Y #n=3
0 |3 |-1 |7 |N
0 |0 |0 |1 |N
0 |0 |6 |6 |Y #n=<anything>









share|improve this question











$endgroup$
















    7












    $begingroup$


    You are given four numbers. The first three are $a$, $b$, and $c$ respectively, for the sequence:



    $$T_n=an^2+bn+c$$



    You may take input of these four numbers in any way. The output should be one of two distinct outputs mentioned in your answer, one means that the fourth number is a term in the sequence (the above equation has at least one solution for $n$ which is an integer when $a$, $b$, $c$ and $T_n$ are substituted for the given values), the other means the opposite.



    This is code golf, so the shortest answer in bytes wins. Your program should work for any input of $a, b, c, T_n$ where the numbers are negative or positive (or 0), decimal or integer. To avoid problems but keep some complexity, non-integers will always just end in $.5$. Standard loop-holes disallowed.



    Test cases



    a |b |c |T_n |Y/N
    ------------------------
    1 |1 |1 |1 |Y #n=0
    2 |3 |5 |2 |N
    0.5 |1 |-2 |-0.5|Y #n=1
    0.5 |1 |-2 |15.5|Y #n=5
    0.5 |1 |-2 |3 |N
    -3.5|2 |-6 |-934|Y #n=-16
    0 |1 |4 |7 |Y #n=3
    0 |3 |-1 |7 |N
    0 |0 |0 |1 |N
    0 |0 |6 |6 |Y #n=<anything>









    share|improve this question











    $endgroup$














      7












      7








      7


      0



      $begingroup$


      You are given four numbers. The first three are $a$, $b$, and $c$ respectively, for the sequence:



      $$T_n=an^2+bn+c$$



      You may take input of these four numbers in any way. The output should be one of two distinct outputs mentioned in your answer, one means that the fourth number is a term in the sequence (the above equation has at least one solution for $n$ which is an integer when $a$, $b$, $c$ and $T_n$ are substituted for the given values), the other means the opposite.



      This is code golf, so the shortest answer in bytes wins. Your program should work for any input of $a, b, c, T_n$ where the numbers are negative or positive (or 0), decimal or integer. To avoid problems but keep some complexity, non-integers will always just end in $.5$. Standard loop-holes disallowed.



      Test cases



      a |b |c |T_n |Y/N
      ------------------------
      1 |1 |1 |1 |Y #n=0
      2 |3 |5 |2 |N
      0.5 |1 |-2 |-0.5|Y #n=1
      0.5 |1 |-2 |15.5|Y #n=5
      0.5 |1 |-2 |3 |N
      -3.5|2 |-6 |-934|Y #n=-16
      0 |1 |4 |7 |Y #n=3
      0 |3 |-1 |7 |N
      0 |0 |0 |1 |N
      0 |0 |6 |6 |Y #n=<anything>









      share|improve this question











      $endgroup$




      You are given four numbers. The first three are $a$, $b$, and $c$ respectively, for the sequence:



      $$T_n=an^2+bn+c$$



      You may take input of these four numbers in any way. The output should be one of two distinct outputs mentioned in your answer, one means that the fourth number is a term in the sequence (the above equation has at least one solution for $n$ which is an integer when $a$, $b$, $c$ and $T_n$ are substituted for the given values), the other means the opposite.



      This is code golf, so the shortest answer in bytes wins. Your program should work for any input of $a, b, c, T_n$ where the numbers are negative or positive (or 0), decimal or integer. To avoid problems but keep some complexity, non-integers will always just end in $.5$. Standard loop-holes disallowed.



      Test cases



      a |b |c |T_n |Y/N
      ------------------------
      1 |1 |1 |1 |Y #n=0
      2 |3 |5 |2 |N
      0.5 |1 |-2 |-0.5|Y #n=1
      0.5 |1 |-2 |15.5|Y #n=5
      0.5 |1 |-2 |3 |N
      -3.5|2 |-6 |-934|Y #n=-16
      0 |1 |4 |7 |Y #n=3
      0 |3 |-1 |7 |N
      0 |0 |0 |1 |N
      0 |0 |6 |6 |Y #n=<anything>






      code-golf number decision-problem equation






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 4 hours ago







      Artemis Fowl

















      asked 10 hours ago









      Artemis FowlArtemis Fowl

      1767




      1767




















          4 Answers
          4






          active

          oldest

          votes


















          4












          $begingroup$

          JavaScript (ES7), 48 bytes



          Returns a Boolean value.





          (a,b,c,t)=>(t-=c,a?(b*b+4*a*t)**.5%1:b?t%b:t)==0


          Try it online!



          How?



          For sake of clarity, we define $d = T_n-c$. (The same variable $t$ is re-used to store this result in the JS code.)



          Case $aneq0$



          The equation really is quadratic:



          $$T_n=an^2+bn+c\
          an^2+bn-d=0$$



          And its discriminant is:



          $$Delta=b^2+4ad$$



          It admits an integer root if $Delta$ is non-negative and $sqrtDelta$ is an integer.



          Case $a=0, bneq0$



          The equation is linear:



          $$T_n=bn+c\
          bn=d\
          n=fracdb$$



          It admits an integer root if $dequiv0pmod b$.



          Case $a=0, b=0$



          The equation is not depending on $n$ anymore:



          $$T_n=c\
          d=0$$






          share|improve this answer











          $endgroup$




















            3












            $begingroup$


            Jelly,  11  10 bytes



            _/Ær1Ẹ?%1Ạ


            A monadic Link which accepts a list of lists* [[c, b, a], [T_n]] and yields 0 if T_n is a valid solution or 1 if not.



            * admittedly taking a little liberty with "You may take input of these four numbers in any way".



            Try it online! Or see a test-suite.



            How?



            _/Ær1Ẹ?%1Ạ - Link: list of lists of integers, [[c, b, a], [T_n]]
            / - reduce by:
            _ - subtraction [c-T_n, b, a]
            ? - if...
            Ẹ - ...condition: any?
            Ær - ...then: roots of polynomial i.e. roots of a²x+bx+(c-T_n)=0
            1 - ...else: literal 1
            %1 - modulo 1 (vectorises) i.e. for each: keep any fractional part
            - note: (a+bi)%1 yields nan which is truthy
            Ạ - all? i.e. all had fractional parts?
            - note: all([]) yields 1



            If we could yield non-distinct results then _/Ær1Ẹ?ḞƑƇ would also work for 10 (it yields 1 when all values are solutions, otherwise a list of the distinct solutions and hence always an empty list when no solutions - this would also meet the standard Truthy vs Falsey definition)






            share|improve this answer











            $endgroup$








            • 1




              $begingroup$
              That input is perfectly fine.
              $endgroup$
              – Artemis Fowl
              6 hours ago


















            0












            $begingroup$


            Jelly, 15 bytes



            _3¦UÆr=Ḟ$;3ị=ɗẸ


            Try it online!



            Built-in helps here but doesn’t handle a=b=0.






            share|improve this answer









            $endgroup$




















              0












              $begingroup$


              Wolfram Language (Mathematica), 38 bytes



              Solve[n^2#+n#2+#3==#4,n,Integers]!=&


              Try it online!






              share|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.ifUsing("editor", function ()
                StackExchange.using("externalEditor", function ()
                StackExchange.using("snippets", function ()
                StackExchange.snippets.init();
                );
                );
                , "code-snippets");

                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "200"
                ;
                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: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                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
                ,
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );













                draft saved

                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f182606%2fvalid-term-from-quadratic-sequence%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









                4












                $begingroup$

                JavaScript (ES7), 48 bytes



                Returns a Boolean value.





                (a,b,c,t)=>(t-=c,a?(b*b+4*a*t)**.5%1:b?t%b:t)==0


                Try it online!



                How?



                For sake of clarity, we define $d = T_n-c$. (The same variable $t$ is re-used to store this result in the JS code.)



                Case $aneq0$



                The equation really is quadratic:



                $$T_n=an^2+bn+c\
                an^2+bn-d=0$$



                And its discriminant is:



                $$Delta=b^2+4ad$$



                It admits an integer root if $Delta$ is non-negative and $sqrtDelta$ is an integer.



                Case $a=0, bneq0$



                The equation is linear:



                $$T_n=bn+c\
                bn=d\
                n=fracdb$$



                It admits an integer root if $dequiv0pmod b$.



                Case $a=0, b=0$



                The equation is not depending on $n$ anymore:



                $$T_n=c\
                d=0$$






                share|improve this answer











                $endgroup$

















                  4












                  $begingroup$

                  JavaScript (ES7), 48 bytes



                  Returns a Boolean value.





                  (a,b,c,t)=>(t-=c,a?(b*b+4*a*t)**.5%1:b?t%b:t)==0


                  Try it online!



                  How?



                  For sake of clarity, we define $d = T_n-c$. (The same variable $t$ is re-used to store this result in the JS code.)



                  Case $aneq0$



                  The equation really is quadratic:



                  $$T_n=an^2+bn+c\
                  an^2+bn-d=0$$



                  And its discriminant is:



                  $$Delta=b^2+4ad$$



                  It admits an integer root if $Delta$ is non-negative and $sqrtDelta$ is an integer.



                  Case $a=0, bneq0$



                  The equation is linear:



                  $$T_n=bn+c\
                  bn=d\
                  n=fracdb$$



                  It admits an integer root if $dequiv0pmod b$.



                  Case $a=0, b=0$



                  The equation is not depending on $n$ anymore:



                  $$T_n=c\
                  d=0$$






                  share|improve this answer











                  $endgroup$















                    4












                    4








                    4





                    $begingroup$

                    JavaScript (ES7), 48 bytes



                    Returns a Boolean value.





                    (a,b,c,t)=>(t-=c,a?(b*b+4*a*t)**.5%1:b?t%b:t)==0


                    Try it online!



                    How?



                    For sake of clarity, we define $d = T_n-c$. (The same variable $t$ is re-used to store this result in the JS code.)



                    Case $aneq0$



                    The equation really is quadratic:



                    $$T_n=an^2+bn+c\
                    an^2+bn-d=0$$



                    And its discriminant is:



                    $$Delta=b^2+4ad$$



                    It admits an integer root if $Delta$ is non-negative and $sqrtDelta$ is an integer.



                    Case $a=0, bneq0$



                    The equation is linear:



                    $$T_n=bn+c\
                    bn=d\
                    n=fracdb$$



                    It admits an integer root if $dequiv0pmod b$.



                    Case $a=0, b=0$



                    The equation is not depending on $n$ anymore:



                    $$T_n=c\
                    d=0$$






                    share|improve this answer











                    $endgroup$



                    JavaScript (ES7), 48 bytes



                    Returns a Boolean value.





                    (a,b,c,t)=>(t-=c,a?(b*b+4*a*t)**.5%1:b?t%b:t)==0


                    Try it online!



                    How?



                    For sake of clarity, we define $d = T_n-c$. (The same variable $t$ is re-used to store this result in the JS code.)



                    Case $aneq0$



                    The equation really is quadratic:



                    $$T_n=an^2+bn+c\
                    an^2+bn-d=0$$



                    And its discriminant is:



                    $$Delta=b^2+4ad$$



                    It admits an integer root if $Delta$ is non-negative and $sqrtDelta$ is an integer.



                    Case $a=0, bneq0$



                    The equation is linear:



                    $$T_n=bn+c\
                    bn=d\
                    n=fracdb$$



                    It admits an integer root if $dequiv0pmod b$.



                    Case $a=0, b=0$



                    The equation is not depending on $n$ anymore:



                    $$T_n=c\
                    d=0$$







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited 9 hours ago

























                    answered 9 hours ago









                    ArnauldArnauld

                    80.2k797331




                    80.2k797331





















                        3












                        $begingroup$


                        Jelly,  11  10 bytes



                        _/Ær1Ẹ?%1Ạ


                        A monadic Link which accepts a list of lists* [[c, b, a], [T_n]] and yields 0 if T_n is a valid solution or 1 if not.



                        * admittedly taking a little liberty with "You may take input of these four numbers in any way".



                        Try it online! Or see a test-suite.



                        How?



                        _/Ær1Ẹ?%1Ạ - Link: list of lists of integers, [[c, b, a], [T_n]]
                        / - reduce by:
                        _ - subtraction [c-T_n, b, a]
                        ? - if...
                        Ẹ - ...condition: any?
                        Ær - ...then: roots of polynomial i.e. roots of a²x+bx+(c-T_n)=0
                        1 - ...else: literal 1
                        %1 - modulo 1 (vectorises) i.e. for each: keep any fractional part
                        - note: (a+bi)%1 yields nan which is truthy
                        Ạ - all? i.e. all had fractional parts?
                        - note: all([]) yields 1



                        If we could yield non-distinct results then _/Ær1Ẹ?ḞƑƇ would also work for 10 (it yields 1 when all values are solutions, otherwise a list of the distinct solutions and hence always an empty list when no solutions - this would also meet the standard Truthy vs Falsey definition)






                        share|improve this answer











                        $endgroup$








                        • 1




                          $begingroup$
                          That input is perfectly fine.
                          $endgroup$
                          – Artemis Fowl
                          6 hours ago















                        3












                        $begingroup$


                        Jelly,  11  10 bytes



                        _/Ær1Ẹ?%1Ạ


                        A monadic Link which accepts a list of lists* [[c, b, a], [T_n]] and yields 0 if T_n is a valid solution or 1 if not.



                        * admittedly taking a little liberty with "You may take input of these four numbers in any way".



                        Try it online! Or see a test-suite.



                        How?



                        _/Ær1Ẹ?%1Ạ - Link: list of lists of integers, [[c, b, a], [T_n]]
                        / - reduce by:
                        _ - subtraction [c-T_n, b, a]
                        ? - if...
                        Ẹ - ...condition: any?
                        Ær - ...then: roots of polynomial i.e. roots of a²x+bx+(c-T_n)=0
                        1 - ...else: literal 1
                        %1 - modulo 1 (vectorises) i.e. for each: keep any fractional part
                        - note: (a+bi)%1 yields nan which is truthy
                        Ạ - all? i.e. all had fractional parts?
                        - note: all([]) yields 1



                        If we could yield non-distinct results then _/Ær1Ẹ?ḞƑƇ would also work for 10 (it yields 1 when all values are solutions, otherwise a list of the distinct solutions and hence always an empty list when no solutions - this would also meet the standard Truthy vs Falsey definition)






                        share|improve this answer











                        $endgroup$








                        • 1




                          $begingroup$
                          That input is perfectly fine.
                          $endgroup$
                          – Artemis Fowl
                          6 hours ago













                        3












                        3








                        3





                        $begingroup$


                        Jelly,  11  10 bytes



                        _/Ær1Ẹ?%1Ạ


                        A monadic Link which accepts a list of lists* [[c, b, a], [T_n]] and yields 0 if T_n is a valid solution or 1 if not.



                        * admittedly taking a little liberty with "You may take input of these four numbers in any way".



                        Try it online! Or see a test-suite.



                        How?



                        _/Ær1Ẹ?%1Ạ - Link: list of lists of integers, [[c, b, a], [T_n]]
                        / - reduce by:
                        _ - subtraction [c-T_n, b, a]
                        ? - if...
                        Ẹ - ...condition: any?
                        Ær - ...then: roots of polynomial i.e. roots of a²x+bx+(c-T_n)=0
                        1 - ...else: literal 1
                        %1 - modulo 1 (vectorises) i.e. for each: keep any fractional part
                        - note: (a+bi)%1 yields nan which is truthy
                        Ạ - all? i.e. all had fractional parts?
                        - note: all([]) yields 1



                        If we could yield non-distinct results then _/Ær1Ẹ?ḞƑƇ would also work for 10 (it yields 1 when all values are solutions, otherwise a list of the distinct solutions and hence always an empty list when no solutions - this would also meet the standard Truthy vs Falsey definition)






                        share|improve this answer











                        $endgroup$




                        Jelly,  11  10 bytes



                        _/Ær1Ẹ?%1Ạ


                        A monadic Link which accepts a list of lists* [[c, b, a], [T_n]] and yields 0 if T_n is a valid solution or 1 if not.



                        * admittedly taking a little liberty with "You may take input of these four numbers in any way".



                        Try it online! Or see a test-suite.



                        How?



                        _/Ær1Ẹ?%1Ạ - Link: list of lists of integers, [[c, b, a], [T_n]]
                        / - reduce by:
                        _ - subtraction [c-T_n, b, a]
                        ? - if...
                        Ẹ - ...condition: any?
                        Ær - ...then: roots of polynomial i.e. roots of a²x+bx+(c-T_n)=0
                        1 - ...else: literal 1
                        %1 - modulo 1 (vectorises) i.e. for each: keep any fractional part
                        - note: (a+bi)%1 yields nan which is truthy
                        Ạ - all? i.e. all had fractional parts?
                        - note: all([]) yields 1



                        If we could yield non-distinct results then _/Ær1Ẹ?ḞƑƇ would also work for 10 (it yields 1 when all values are solutions, otherwise a list of the distinct solutions and hence always an empty list when no solutions - this would also meet the standard Truthy vs Falsey definition)







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited 5 hours ago

























                        answered 7 hours ago









                        Jonathan AllanJonathan Allan

                        53.6k535173




                        53.6k535173







                        • 1




                          $begingroup$
                          That input is perfectly fine.
                          $endgroup$
                          – Artemis Fowl
                          6 hours ago












                        • 1




                          $begingroup$
                          That input is perfectly fine.
                          $endgroup$
                          – Artemis Fowl
                          6 hours ago







                        1




                        1




                        $begingroup$
                        That input is perfectly fine.
                        $endgroup$
                        – Artemis Fowl
                        6 hours ago




                        $begingroup$
                        That input is perfectly fine.
                        $endgroup$
                        – Artemis Fowl
                        6 hours ago











                        0












                        $begingroup$


                        Jelly, 15 bytes



                        _3¦UÆr=Ḟ$;3ị=ɗẸ


                        Try it online!



                        Built-in helps here but doesn’t handle a=b=0.






                        share|improve this answer









                        $endgroup$

















                          0












                          $begingroup$


                          Jelly, 15 bytes



                          _3¦UÆr=Ḟ$;3ị=ɗẸ


                          Try it online!



                          Built-in helps here but doesn’t handle a=b=0.






                          share|improve this answer









                          $endgroup$















                            0












                            0








                            0





                            $begingroup$


                            Jelly, 15 bytes



                            _3¦UÆr=Ḟ$;3ị=ɗẸ


                            Try it online!



                            Built-in helps here but doesn’t handle a=b=0.






                            share|improve this answer









                            $endgroup$




                            Jelly, 15 bytes



                            _3¦UÆr=Ḟ$;3ị=ɗẸ


                            Try it online!



                            Built-in helps here but doesn’t handle a=b=0.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 7 hours ago









                            Nick KennedyNick Kennedy

                            1,29649




                            1,29649





















                                0












                                $begingroup$


                                Wolfram Language (Mathematica), 38 bytes



                                Solve[n^2#+n#2+#3==#4,n,Integers]!=&


                                Try it online!






                                share|improve this answer









                                $endgroup$

















                                  0












                                  $begingroup$


                                  Wolfram Language (Mathematica), 38 bytes



                                  Solve[n^2#+n#2+#3==#4,n,Integers]!=&


                                  Try it online!






                                  share|improve this answer









                                  $endgroup$















                                    0












                                    0








                                    0





                                    $begingroup$


                                    Wolfram Language (Mathematica), 38 bytes



                                    Solve[n^2#+n#2+#3==#4,n,Integers]!=&


                                    Try it online!






                                    share|improve this answer









                                    $endgroup$




                                    Wolfram Language (Mathematica), 38 bytes



                                    Solve[n^2#+n#2+#3==#4,n,Integers]!=&


                                    Try it online!







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered 2 hours ago









                                    J42161217J42161217

                                    13.7k21253




                                    13.7k21253



























                                        draft saved

                                        draft discarded
















































                                        If this is an answer to a challenge…



                                        • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                        • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                          Explanations of your answer make it more interesting to read and are very much encouraged.


                                        • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


                                        More generally…



                                        • …Please make sure to answer the question and provide sufficient detail.


                                        • …Avoid asking for help, clarification or responding to other answers (use comments instead).




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f182606%2fvalid-term-from-quadratic-sequence%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 create a command for the “strange m” symbol in latex? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How do you make your own symbol when Detexify fails?Writing bold small caps with mathpazo packageplus-minus symbol with parenthesis around the minus signGreek character in Beamer document titleHow to create dashed right arrow over symbol?Currency symbol: Turkish LiraDouble prec as a single symbol?Plus Sign Too Big; How to Call adfbullet?Is there a TeX macro for three-legged pi?How do I get my integral-like symbol to align like the integral?How to selectively substitute a letter with another symbol representing the same letterHow do I generate a less than symbol and vertical bar that are the same height?

                                        Българска екзархия Съдържание История | Български екзарси | Вижте също | Външни препратки | Литература | Бележки | НавигацияУстав за управлението на българската екзархия. Цариград, 1870Слово на Ловешкия митрополит Иларион при откриването на Българския народен събор в Цариград на 23. II. 1870 г.Българската правда и гръцката кривда. От С. М. (= Софийски Мелетий). Цариград, 1872Предстоятели на Българската екзархияПодмененият ВеликденИнформационна агенция „Фокус“Димитър Ризов. Българите в техните исторически, етнографически и политически граници (Атлас съдържащ 40 карти). Berlin, Königliche Hoflithographie, Hof-Buch- und -Steindruckerei Wilhelm Greve, 1917Report of the International Commission to Inquire into the Causes and Conduct of the Balkan Wars

                                        Чепеларе Съдържание География | История | Население | Спортни и природни забележителности | Културни и исторически обекти | Религии | Обществени институции | Известни личности | Редовни събития | Галерия | Източници | Литература | Външни препратки | Навигация41°43′23.99″ с. ш. 24°41′09.99″ и. д. / 41.723333° с. ш. 24.686111° и. д.*ЧепелареЧепеларски Linux fest 2002Начало на Зимен сезон 2005/06Национални хайдушки празници „Капитан Петко Войвода“Град ЧепелареЧепеларе – народният ски курортbgrod.orgwww.terranatura.hit.bgСправка за населението на гр. Исперих, общ. Исперих, обл. РазградМузей на родопския карстМузей на спорта и скитеЧепеларебългарскибългарскианглийскитукИстория на градаСки писти в ЧепелареВремето в ЧепелареРадио и телевизия в ЧепелареЧепеларе мами с родопски чар и добри пистиЕвтин туризъм и снежни атракции в ЧепелареМестоположениеИнформация и снимки от музея на родопския карст3D панорами от ЧепелареЧепелареррр