Prove that if $n$ is an integer, then $1 − n$ is even if and only if $n^2 + 1$ is even.












0












$begingroup$


I am practicing exam questions and have come across the following:

Prove that if n is an integer, then 1 − n is even if and only if $n^2$ + 1 is even.

The first thing that came to mind is a contrapositive proof, but how would I prove this?










share|cite|improve this question











$endgroup$

















    0












    $begingroup$


    I am practicing exam questions and have come across the following:

    Prove that if n is an integer, then 1 − n is even if and only if $n^2$ + 1 is even.

    The first thing that came to mind is a contrapositive proof, but how would I prove this?










    share|cite|improve this question











    $endgroup$















      0












      0








      0





      $begingroup$


      I am practicing exam questions and have come across the following:

      Prove that if n is an integer, then 1 − n is even if and only if $n^2$ + 1 is even.

      The first thing that came to mind is a contrapositive proof, but how would I prove this?










      share|cite|improve this question











      $endgroup$




      I am practicing exam questions and have come across the following:

      Prove that if n is an integer, then 1 − n is even if and only if $n^2$ + 1 is even.

      The first thing that came to mind is a contrapositive proof, but how would I prove this?







      discrete-mathematics logic proof-writing proof-explanation






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Jan 25 at 1:12









      DanielV

      18.1k42755




      18.1k42755










      asked Jan 25 at 0:05









      Usama GhawjiUsama Ghawji

      666




      666






















          5 Answers
          5






          active

          oldest

          votes


















          0












          $begingroup$

          For the forward direction:



          $1-n$ being even would imply that $n$ is odd. Thus, $n^2$ is odd, so $n^2+1$ is even.



          Backwards direction:



          If $n^2+1$ is even, then $n^2$ is odd. Thus, $n$ is odd. Hence, $1-n$ is even.



          For further clarity:



          $n$ being odd means that $n = 2k+1$ for some integer $k$.



          $n$ being even means that $n = 2k$ for some integer $k$.



          You can proceed with a more formal argument using the above definitions.






          share|cite|improve this answer









          $endgroup$





















            0












            $begingroup$

            $n^2 + 1 = (n-1)(n+1) + 2$



            If $n-1$ is even, $n-1+2 = n+1$ is even, their product is even and an even number plus 2 is even.



            Going the other way, if $n^2 + 1$ is even, then so is $n^2 - 1.$ one of the factors $(n-1)(n+1)$ must be even. But if one is even the other is even.






            share|cite|improve this answer









            $endgroup$





















              0












              $begingroup$

              Hint: $, 2mid n(n!+!1) =, n^2, +, 1, -, (1,-,n)phantom{I_{I_{I_{I_1}}}},$

              which implies that $,2mid n^2!+!1!iff! 2mid 1!-!n $ [here $ amid b $ means $,a,$ divides $,b,$]





              Generally: $ $ if $,dmid y-x,$ then $ dmid yiff dmid x$



              i.e. $bmod d!:, $ if $ yequiv x,$ then $,yequiv 0iff xequiv 0$



              i.e. on a line $,yequiv x$ we have $,yequiv 0iff xequiv 0$






              share|cite|improve this answer











              $endgroup$





















                0












                $begingroup$

                $1 - n$ is even iff $n - 1$ is even iff $n$ is odd iff $n^2$ is odd iff $n^2 + 1$ is even.






                share|cite|improve this answer









                $endgroup$





















                  0












                  $begingroup$

                  You can do it straight forwardly in cases.



                  Either $n$ is even or odd.



                  Case 1: $n = 2m$ is even so $1-n =1- 2m = 2(-m) + 1$ is odd and $n^2 + 1 = 4m^2 + 1 = 2(2m^2) + 1$ is odd.



                  Neither $1-n$ nor $n^2 + 1$ is even.



                  Case 2: $n = 2m + 1$ is odd. So $1-n= 1-(2m + 1) = -2m = 2(-m)$ is even, and $n^2 + 1 = (2m+1)^2 + 1 = 4m^2 + 4m + 1 + 1 = 2(2m^2 + 2m +1)$ is even.



                  So both $1-n$ and $n^2 + 1$ are even.



                  So $1-n$ is even precisely and only when $n^2 + 1$ is even.






                  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%2f3086541%2fprove-that-if-n-is-an-integer-then-1-%25e2%2588%2592-n-is-even-if-and-only-if-n2-1-i%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown

























                    5 Answers
                    5






                    active

                    oldest

                    votes








                    5 Answers
                    5






                    active

                    oldest

                    votes









                    active

                    oldest

                    votes






                    active

                    oldest

                    votes









                    0












                    $begingroup$

                    For the forward direction:



                    $1-n$ being even would imply that $n$ is odd. Thus, $n^2$ is odd, so $n^2+1$ is even.



                    Backwards direction:



                    If $n^2+1$ is even, then $n^2$ is odd. Thus, $n$ is odd. Hence, $1-n$ is even.



                    For further clarity:



                    $n$ being odd means that $n = 2k+1$ for some integer $k$.



                    $n$ being even means that $n = 2k$ for some integer $k$.



                    You can proceed with a more formal argument using the above definitions.






                    share|cite|improve this answer









                    $endgroup$


















                      0












                      $begingroup$

                      For the forward direction:



                      $1-n$ being even would imply that $n$ is odd. Thus, $n^2$ is odd, so $n^2+1$ is even.



                      Backwards direction:



                      If $n^2+1$ is even, then $n^2$ is odd. Thus, $n$ is odd. Hence, $1-n$ is even.



                      For further clarity:



                      $n$ being odd means that $n = 2k+1$ for some integer $k$.



                      $n$ being even means that $n = 2k$ for some integer $k$.



                      You can proceed with a more formal argument using the above definitions.






                      share|cite|improve this answer









                      $endgroup$
















                        0












                        0








                        0





                        $begingroup$

                        For the forward direction:



                        $1-n$ being even would imply that $n$ is odd. Thus, $n^2$ is odd, so $n^2+1$ is even.



                        Backwards direction:



                        If $n^2+1$ is even, then $n^2$ is odd. Thus, $n$ is odd. Hence, $1-n$ is even.



                        For further clarity:



                        $n$ being odd means that $n = 2k+1$ for some integer $k$.



                        $n$ being even means that $n = 2k$ for some integer $k$.



                        You can proceed with a more formal argument using the above definitions.






                        share|cite|improve this answer









                        $endgroup$



                        For the forward direction:



                        $1-n$ being even would imply that $n$ is odd. Thus, $n^2$ is odd, so $n^2+1$ is even.



                        Backwards direction:



                        If $n^2+1$ is even, then $n^2$ is odd. Thus, $n$ is odd. Hence, $1-n$ is even.



                        For further clarity:



                        $n$ being odd means that $n = 2k+1$ for some integer $k$.



                        $n$ being even means that $n = 2k$ for some integer $k$.



                        You can proceed with a more formal argument using the above definitions.







                        share|cite|improve this answer












                        share|cite|improve this answer



                        share|cite|improve this answer










                        answered Jan 25 at 0:12









                        MetricMetric

                        1,25159




                        1,25159























                            0












                            $begingroup$

                            $n^2 + 1 = (n-1)(n+1) + 2$



                            If $n-1$ is even, $n-1+2 = n+1$ is even, their product is even and an even number plus 2 is even.



                            Going the other way, if $n^2 + 1$ is even, then so is $n^2 - 1.$ one of the factors $(n-1)(n+1)$ must be even. But if one is even the other is even.






                            share|cite|improve this answer









                            $endgroup$


















                              0












                              $begingroup$

                              $n^2 + 1 = (n-1)(n+1) + 2$



                              If $n-1$ is even, $n-1+2 = n+1$ is even, their product is even and an even number plus 2 is even.



                              Going the other way, if $n^2 + 1$ is even, then so is $n^2 - 1.$ one of the factors $(n-1)(n+1)$ must be even. But if one is even the other is even.






                              share|cite|improve this answer









                              $endgroup$
















                                0












                                0








                                0





                                $begingroup$

                                $n^2 + 1 = (n-1)(n+1) + 2$



                                If $n-1$ is even, $n-1+2 = n+1$ is even, their product is even and an even number plus 2 is even.



                                Going the other way, if $n^2 + 1$ is even, then so is $n^2 - 1.$ one of the factors $(n-1)(n+1)$ must be even. But if one is even the other is even.






                                share|cite|improve this answer









                                $endgroup$



                                $n^2 + 1 = (n-1)(n+1) + 2$



                                If $n-1$ is even, $n-1+2 = n+1$ is even, their product is even and an even number plus 2 is even.



                                Going the other way, if $n^2 + 1$ is even, then so is $n^2 - 1.$ one of the factors $(n-1)(n+1)$ must be even. But if one is even the other is even.







                                share|cite|improve this answer












                                share|cite|improve this answer



                                share|cite|improve this answer










                                answered Jan 25 at 0:17









                                Doug MDoug M

                                45.3k31954




                                45.3k31954























                                    0












                                    $begingroup$

                                    Hint: $, 2mid n(n!+!1) =, n^2, +, 1, -, (1,-,n)phantom{I_{I_{I_{I_1}}}},$

                                    which implies that $,2mid n^2!+!1!iff! 2mid 1!-!n $ [here $ amid b $ means $,a,$ divides $,b,$]





                                    Generally: $ $ if $,dmid y-x,$ then $ dmid yiff dmid x$



                                    i.e. $bmod d!:, $ if $ yequiv x,$ then $,yequiv 0iff xequiv 0$



                                    i.e. on a line $,yequiv x$ we have $,yequiv 0iff xequiv 0$






                                    share|cite|improve this answer











                                    $endgroup$


















                                      0












                                      $begingroup$

                                      Hint: $, 2mid n(n!+!1) =, n^2, +, 1, -, (1,-,n)phantom{I_{I_{I_{I_1}}}},$

                                      which implies that $,2mid n^2!+!1!iff! 2mid 1!-!n $ [here $ amid b $ means $,a,$ divides $,b,$]





                                      Generally: $ $ if $,dmid y-x,$ then $ dmid yiff dmid x$



                                      i.e. $bmod d!:, $ if $ yequiv x,$ then $,yequiv 0iff xequiv 0$



                                      i.e. on a line $,yequiv x$ we have $,yequiv 0iff xequiv 0$






                                      share|cite|improve this answer











                                      $endgroup$
















                                        0












                                        0








                                        0





                                        $begingroup$

                                        Hint: $, 2mid n(n!+!1) =, n^2, +, 1, -, (1,-,n)phantom{I_{I_{I_{I_1}}}},$

                                        which implies that $,2mid n^2!+!1!iff! 2mid 1!-!n $ [here $ amid b $ means $,a,$ divides $,b,$]





                                        Generally: $ $ if $,dmid y-x,$ then $ dmid yiff dmid x$



                                        i.e. $bmod d!:, $ if $ yequiv x,$ then $,yequiv 0iff xequiv 0$



                                        i.e. on a line $,yequiv x$ we have $,yequiv 0iff xequiv 0$






                                        share|cite|improve this answer











                                        $endgroup$



                                        Hint: $, 2mid n(n!+!1) =, n^2, +, 1, -, (1,-,n)phantom{I_{I_{I_{I_1}}}},$

                                        which implies that $,2mid n^2!+!1!iff! 2mid 1!-!n $ [here $ amid b $ means $,a,$ divides $,b,$]





                                        Generally: $ $ if $,dmid y-x,$ then $ dmid yiff dmid x$



                                        i.e. $bmod d!:, $ if $ yequiv x,$ then $,yequiv 0iff xequiv 0$



                                        i.e. on a line $,yequiv x$ we have $,yequiv 0iff xequiv 0$







                                        share|cite|improve this answer














                                        share|cite|improve this answer



                                        share|cite|improve this answer








                                        edited Jan 25 at 0:43

























                                        answered Jan 25 at 0:33









                                        Bill DubuqueBill Dubuque

                                        212k29195654




                                        212k29195654























                                            0












                                            $begingroup$

                                            $1 - n$ is even iff $n - 1$ is even iff $n$ is odd iff $n^2$ is odd iff $n^2 + 1$ is even.






                                            share|cite|improve this answer









                                            $endgroup$


















                                              0












                                              $begingroup$

                                              $1 - n$ is even iff $n - 1$ is even iff $n$ is odd iff $n^2$ is odd iff $n^2 + 1$ is even.






                                              share|cite|improve this answer









                                              $endgroup$
















                                                0












                                                0








                                                0





                                                $begingroup$

                                                $1 - n$ is even iff $n - 1$ is even iff $n$ is odd iff $n^2$ is odd iff $n^2 + 1$ is even.






                                                share|cite|improve this answer









                                                $endgroup$



                                                $1 - n$ is even iff $n - 1$ is even iff $n$ is odd iff $n^2$ is odd iff $n^2 + 1$ is even.







                                                share|cite|improve this answer












                                                share|cite|improve this answer



                                                share|cite|improve this answer










                                                answered Jan 25 at 1:11









                                                DanielVDanielV

                                                18.1k42755




                                                18.1k42755























                                                    0












                                                    $begingroup$

                                                    You can do it straight forwardly in cases.



                                                    Either $n$ is even or odd.



                                                    Case 1: $n = 2m$ is even so $1-n =1- 2m = 2(-m) + 1$ is odd and $n^2 + 1 = 4m^2 + 1 = 2(2m^2) + 1$ is odd.



                                                    Neither $1-n$ nor $n^2 + 1$ is even.



                                                    Case 2: $n = 2m + 1$ is odd. So $1-n= 1-(2m + 1) = -2m = 2(-m)$ is even, and $n^2 + 1 = (2m+1)^2 + 1 = 4m^2 + 4m + 1 + 1 = 2(2m^2 + 2m +1)$ is even.



                                                    So both $1-n$ and $n^2 + 1$ are even.



                                                    So $1-n$ is even precisely and only when $n^2 + 1$ is even.






                                                    share|cite|improve this answer











                                                    $endgroup$


















                                                      0












                                                      $begingroup$

                                                      You can do it straight forwardly in cases.



                                                      Either $n$ is even or odd.



                                                      Case 1: $n = 2m$ is even so $1-n =1- 2m = 2(-m) + 1$ is odd and $n^2 + 1 = 4m^2 + 1 = 2(2m^2) + 1$ is odd.



                                                      Neither $1-n$ nor $n^2 + 1$ is even.



                                                      Case 2: $n = 2m + 1$ is odd. So $1-n= 1-(2m + 1) = -2m = 2(-m)$ is even, and $n^2 + 1 = (2m+1)^2 + 1 = 4m^2 + 4m + 1 + 1 = 2(2m^2 + 2m +1)$ is even.



                                                      So both $1-n$ and $n^2 + 1$ are even.



                                                      So $1-n$ is even precisely and only when $n^2 + 1$ is even.






                                                      share|cite|improve this answer











                                                      $endgroup$
















                                                        0












                                                        0








                                                        0





                                                        $begingroup$

                                                        You can do it straight forwardly in cases.



                                                        Either $n$ is even or odd.



                                                        Case 1: $n = 2m$ is even so $1-n =1- 2m = 2(-m) + 1$ is odd and $n^2 + 1 = 4m^2 + 1 = 2(2m^2) + 1$ is odd.



                                                        Neither $1-n$ nor $n^2 + 1$ is even.



                                                        Case 2: $n = 2m + 1$ is odd. So $1-n= 1-(2m + 1) = -2m = 2(-m)$ is even, and $n^2 + 1 = (2m+1)^2 + 1 = 4m^2 + 4m + 1 + 1 = 2(2m^2 + 2m +1)$ is even.



                                                        So both $1-n$ and $n^2 + 1$ are even.



                                                        So $1-n$ is even precisely and only when $n^2 + 1$ is even.






                                                        share|cite|improve this answer











                                                        $endgroup$



                                                        You can do it straight forwardly in cases.



                                                        Either $n$ is even or odd.



                                                        Case 1: $n = 2m$ is even so $1-n =1- 2m = 2(-m) + 1$ is odd and $n^2 + 1 = 4m^2 + 1 = 2(2m^2) + 1$ is odd.



                                                        Neither $1-n$ nor $n^2 + 1$ is even.



                                                        Case 2: $n = 2m + 1$ is odd. So $1-n= 1-(2m + 1) = -2m = 2(-m)$ is even, and $n^2 + 1 = (2m+1)^2 + 1 = 4m^2 + 4m + 1 + 1 = 2(2m^2 + 2m +1)$ is even.



                                                        So both $1-n$ and $n^2 + 1$ are even.



                                                        So $1-n$ is even precisely and only when $n^2 + 1$ is even.







                                                        share|cite|improve this answer














                                                        share|cite|improve this answer



                                                        share|cite|improve this answer








                                                        edited Jan 25 at 1:40









                                                        J. W. Tanner

                                                        3,3451320




                                                        3,3451320










                                                        answered Jan 25 at 0:20









                                                        fleabloodfleablood

                                                        72.7k22788




                                                        72.7k22788






























                                                            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%2f3086541%2fprove-that-if-n-is-an-integer-then-1-%25e2%2588%2592-n-is-even-if-and-only-if-n2-1-i%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

                                                            MongoDB - Not Authorized To Execute Command

                                                            How to fix TextFormField cause rebuild widget in Flutter

                                                            Npm cannot find a required file even through it is in the searched directory