A formula to obtain every (positive) integers non-multiple of 4?











up vote
1
down vote

favorite












I'm working on a conjecture and I've come up to a point where I need to express every non-zero positive integers not divisble by 4 with only one parameter (as you would express every even number as 2p). Here the parameter p has to cross the whole natural integers domain $N*$.



Before giving you any further information about the idea I have to express such a set of numbers, I would like to show you something that might come in handy.



Earlier while working on the said conjecture I needed to express (still with only one parameter n) a repeating sequence: (5, 0, 2, 3, 8, 6). I've succeded. I've come up using Fibonacci's sequence to do it. The idea was to notice that -4 the sequence was (1, -4, -2, -1, 4, 2) then write it as $u_n =(-1)^{f(n)}2^{g(n)}$ with $f(n)$ being odd three consecutive time then even the three following, and $g(n)$ alternating between $0,1,2$.
Finally I've come up with: $$g(n) =1+frac {(-1)^{F_n}-(-1)^{F_{n+2}}}{2}$$ $f(n)$ is not interesting here. What's to be noticed is that $h(n)=g(n)-1 =frac {(-1)^{F_n}-(-1)^{F_{n+2}}}{2}$ alternates between $-1,0,1$.



Now for the idea: non-multiples of 4 are $u_i=1,2,3,5,6,7,9,10,11,13,14,15...$ So basically we can add the $h(n)$ function to numbers $2+6k$ and write $u_i$ as: $$u_i = 2+6{k(i)} + h(i)$$With $i$ in $N*$



Therefore the question is can you find an expression for $k(n)$ that would at least inspire me. Thanks a lot for your answers.










share|cite|improve this question







New contributor




Acolatse Komlan Jr. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    1
    down vote

    favorite












    I'm working on a conjecture and I've come up to a point where I need to express every non-zero positive integers not divisble by 4 with only one parameter (as you would express every even number as 2p). Here the parameter p has to cross the whole natural integers domain $N*$.



    Before giving you any further information about the idea I have to express such a set of numbers, I would like to show you something that might come in handy.



    Earlier while working on the said conjecture I needed to express (still with only one parameter n) a repeating sequence: (5, 0, 2, 3, 8, 6). I've succeded. I've come up using Fibonacci's sequence to do it. The idea was to notice that -4 the sequence was (1, -4, -2, -1, 4, 2) then write it as $u_n =(-1)^{f(n)}2^{g(n)}$ with $f(n)$ being odd three consecutive time then even the three following, and $g(n)$ alternating between $0,1,2$.
    Finally I've come up with: $$g(n) =1+frac {(-1)^{F_n}-(-1)^{F_{n+2}}}{2}$$ $f(n)$ is not interesting here. What's to be noticed is that $h(n)=g(n)-1 =frac {(-1)^{F_n}-(-1)^{F_{n+2}}}{2}$ alternates between $-1,0,1$.



    Now for the idea: non-multiples of 4 are $u_i=1,2,3,5,6,7,9,10,11,13,14,15...$ So basically we can add the $h(n)$ function to numbers $2+6k$ and write $u_i$ as: $$u_i = 2+6{k(i)} + h(i)$$With $i$ in $N*$



    Therefore the question is can you find an expression for $k(n)$ that would at least inspire me. Thanks a lot for your answers.










    share|cite|improve this question







    New contributor




    Acolatse Komlan Jr. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I'm working on a conjecture and I've come up to a point where I need to express every non-zero positive integers not divisble by 4 with only one parameter (as you would express every even number as 2p). Here the parameter p has to cross the whole natural integers domain $N*$.



      Before giving you any further information about the idea I have to express such a set of numbers, I would like to show you something that might come in handy.



      Earlier while working on the said conjecture I needed to express (still with only one parameter n) a repeating sequence: (5, 0, 2, 3, 8, 6). I've succeded. I've come up using Fibonacci's sequence to do it. The idea was to notice that -4 the sequence was (1, -4, -2, -1, 4, 2) then write it as $u_n =(-1)^{f(n)}2^{g(n)}$ with $f(n)$ being odd three consecutive time then even the three following, and $g(n)$ alternating between $0,1,2$.
      Finally I've come up with: $$g(n) =1+frac {(-1)^{F_n}-(-1)^{F_{n+2}}}{2}$$ $f(n)$ is not interesting here. What's to be noticed is that $h(n)=g(n)-1 =frac {(-1)^{F_n}-(-1)^{F_{n+2}}}{2}$ alternates between $-1,0,1$.



      Now for the idea: non-multiples of 4 are $u_i=1,2,3,5,6,7,9,10,11,13,14,15...$ So basically we can add the $h(n)$ function to numbers $2+6k$ and write $u_i$ as: $$u_i = 2+6{k(i)} + h(i)$$With $i$ in $N*$



      Therefore the question is can you find an expression for $k(n)$ that would at least inspire me. Thanks a lot for your answers.










      share|cite|improve this question







      New contributor




      Acolatse Komlan Jr. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I'm working on a conjecture and I've come up to a point where I need to express every non-zero positive integers not divisble by 4 with only one parameter (as you would express every even number as 2p). Here the parameter p has to cross the whole natural integers domain $N*$.



      Before giving you any further information about the idea I have to express such a set of numbers, I would like to show you something that might come in handy.



      Earlier while working on the said conjecture I needed to express (still with only one parameter n) a repeating sequence: (5, 0, 2, 3, 8, 6). I've succeded. I've come up using Fibonacci's sequence to do it. The idea was to notice that -4 the sequence was (1, -4, -2, -1, 4, 2) then write it as $u_n =(-1)^{f(n)}2^{g(n)}$ with $f(n)$ being odd three consecutive time then even the three following, and $g(n)$ alternating between $0,1,2$.
      Finally I've come up with: $$g(n) =1+frac {(-1)^{F_n}-(-1)^{F_{n+2}}}{2}$$ $f(n)$ is not interesting here. What's to be noticed is that $h(n)=g(n)-1 =frac {(-1)^{F_n}-(-1)^{F_{n+2}}}{2}$ alternates between $-1,0,1$.



      Now for the idea: non-multiples of 4 are $u_i=1,2,3,5,6,7,9,10,11,13,14,15...$ So basically we can add the $h(n)$ function to numbers $2+6k$ and write $u_i$ as: $$u_i = 2+6{k(i)} + h(i)$$With $i$ in $N*$



      Therefore the question is can you find an expression for $k(n)$ that would at least inspire me. Thanks a lot for your answers.







      sequences-and-series elementary-number-theory






      share|cite|improve this question







      New contributor




      Acolatse Komlan Jr. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|cite|improve this question







      New contributor




      Acolatse Komlan Jr. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|cite|improve this question




      share|cite|improve this question






      New contributor




      Acolatse Komlan Jr. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 16 at 0:08









      Acolatse Komlan Jr.

      61




      61




      New contributor




      Acolatse Komlan Jr. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Acolatse Komlan Jr. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Acolatse Komlan Jr. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote













          Let $n = 3k + r;$ where $1le r le 3$. In other words $k = lfloor frac {n-1}3rfloor$ and $r = n - 3k$.



          Just let $N = 4*k + r$



          Or $N = 4 lfloor frac {n-1}3rfloor + n - 3lfloor frac {n-1}3rfloor = n + lfloor frac {n-1}3rfloor$



          Thus you get $1,2,3,5,6,7,9,10,......$






          share|cite|improve this answer




























            up vote
            2
            down vote













            $$
            u(i) = 4leftlfloorfrac{i}{3}rightrfloor +left(i;mathrm{mod};3right) + 1
            $$

            should do the trick for enumerating all natural numbers not divisible by 4.






            share|cite|improve this answer





















              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',
              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
              });


              }
              });






              Acolatse Komlan Jr. is a new contributor. Be nice, and check out our Code of Conduct.










               

              draft saved


              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3000522%2fa-formula-to-obtain-every-positive-integers-non-multiple-of-4%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              3
              down vote













              Let $n = 3k + r;$ where $1le r le 3$. In other words $k = lfloor frac {n-1}3rfloor$ and $r = n - 3k$.



              Just let $N = 4*k + r$



              Or $N = 4 lfloor frac {n-1}3rfloor + n - 3lfloor frac {n-1}3rfloor = n + lfloor frac {n-1}3rfloor$



              Thus you get $1,2,3,5,6,7,9,10,......$






              share|cite|improve this answer

























                up vote
                3
                down vote













                Let $n = 3k + r;$ where $1le r le 3$. In other words $k = lfloor frac {n-1}3rfloor$ and $r = n - 3k$.



                Just let $N = 4*k + r$



                Or $N = 4 lfloor frac {n-1}3rfloor + n - 3lfloor frac {n-1}3rfloor = n + lfloor frac {n-1}3rfloor$



                Thus you get $1,2,3,5,6,7,9,10,......$






                share|cite|improve this answer























                  up vote
                  3
                  down vote










                  up vote
                  3
                  down vote









                  Let $n = 3k + r;$ where $1le r le 3$. In other words $k = lfloor frac {n-1}3rfloor$ and $r = n - 3k$.



                  Just let $N = 4*k + r$



                  Or $N = 4 lfloor frac {n-1}3rfloor + n - 3lfloor frac {n-1}3rfloor = n + lfloor frac {n-1}3rfloor$



                  Thus you get $1,2,3,5,6,7,9,10,......$






                  share|cite|improve this answer












                  Let $n = 3k + r;$ where $1le r le 3$. In other words $k = lfloor frac {n-1}3rfloor$ and $r = n - 3k$.



                  Just let $N = 4*k + r$



                  Or $N = 4 lfloor frac {n-1}3rfloor + n - 3lfloor frac {n-1}3rfloor = n + lfloor frac {n-1}3rfloor$



                  Thus you get $1,2,3,5,6,7,9,10,......$







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Nov 16 at 0:37









                  fleablood

                  65.6k22682




                  65.6k22682






















                      up vote
                      2
                      down vote













                      $$
                      u(i) = 4leftlfloorfrac{i}{3}rightrfloor +left(i;mathrm{mod};3right) + 1
                      $$

                      should do the trick for enumerating all natural numbers not divisible by 4.






                      share|cite|improve this answer

























                        up vote
                        2
                        down vote













                        $$
                        u(i) = 4leftlfloorfrac{i}{3}rightrfloor +left(i;mathrm{mod};3right) + 1
                        $$

                        should do the trick for enumerating all natural numbers not divisible by 4.






                        share|cite|improve this answer























                          up vote
                          2
                          down vote










                          up vote
                          2
                          down vote









                          $$
                          u(i) = 4leftlfloorfrac{i}{3}rightrfloor +left(i;mathrm{mod};3right) + 1
                          $$

                          should do the trick for enumerating all natural numbers not divisible by 4.






                          share|cite|improve this answer












                          $$
                          u(i) = 4leftlfloorfrac{i}{3}rightrfloor +left(i;mathrm{mod};3right) + 1
                          $$

                          should do the trick for enumerating all natural numbers not divisible by 4.







                          share|cite|improve this answer












                          share|cite|improve this answer



                          share|cite|improve this answer










                          answered Nov 16 at 0:24









                          eyeballfrog

                          5,678528




                          5,678528






















                              Acolatse Komlan Jr. is a new contributor. Be nice, and check out our Code of Conduct.










                               

                              draft saved


                              draft discarded


















                              Acolatse Komlan Jr. is a new contributor. Be nice, and check out our Code of Conduct.













                              Acolatse Komlan Jr. is a new contributor. Be nice, and check out our Code of Conduct.












                              Acolatse Komlan Jr. is a new contributor. Be nice, and check out our Code of Conduct.















                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3000522%2fa-formula-to-obtain-every-positive-integers-non-multiple-of-4%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

                              Quarter-circle Tiles

                              build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                              Mont Emei