The pattern of bitstrings of square numbers












7












$begingroup$


Here is a picture of "square numbers" from mathworld website.






A plot of the first few square numbers represented as a sequence of binary bits is shown above. The top portion shows $1^2$ to $255^2$, and the bottom shows the next 510 values. (Black is for "one" bit, and while is for "zero" bit)




I want to learn more about this pattern. However, there is no further explanation about the pattern of this plot from the website.



Is there any known result about this pattern ?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Counting from the bottom from $0$, row $0$ has period two, and row $n$ when $n>0$ has period which is a divisor of $2^n$.
    $endgroup$
    – Thomas Andrews
    Apr 3 '13 at 14:30






  • 1




    $begingroup$
    It's also the case that row $n$ values are symmetric around the multiples of $2^n$ - that is, the squares of $a2^n-b$ and $a2^n+b$ have the same $n$th bit, for all $a,b$ with $b<a2^n$
    $endgroup$
    – Thomas Andrews
    Apr 3 '13 at 14:35












  • $begingroup$
    Vertical periodicity: $(2^mn)^2=2^{2m}n^2=n^2<<2m,$ where $a<<b$ is a shifted to the left by b binary places (i.e. the pattern is shifted upwards).
    $endgroup$
    – Loki Clock
    Apr 3 '13 at 14:37










  • $begingroup$
    I deleted my previous comment; the lengths of the rows of most significant digits are not powers of 2.
    $endgroup$
    – Loki Clock
    Apr 3 '13 at 20:26










  • $begingroup$
    Has anyone tried this for other radixes?
    $endgroup$
    – Jack M
    Apr 3 '13 at 21:22
















7












$begingroup$


Here is a picture of "square numbers" from mathworld website.






A plot of the first few square numbers represented as a sequence of binary bits is shown above. The top portion shows $1^2$ to $255^2$, and the bottom shows the next 510 values. (Black is for "one" bit, and while is for "zero" bit)




I want to learn more about this pattern. However, there is no further explanation about the pattern of this plot from the website.



Is there any known result about this pattern ?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Counting from the bottom from $0$, row $0$ has period two, and row $n$ when $n>0$ has period which is a divisor of $2^n$.
    $endgroup$
    – Thomas Andrews
    Apr 3 '13 at 14:30






  • 1




    $begingroup$
    It's also the case that row $n$ values are symmetric around the multiples of $2^n$ - that is, the squares of $a2^n-b$ and $a2^n+b$ have the same $n$th bit, for all $a,b$ with $b<a2^n$
    $endgroup$
    – Thomas Andrews
    Apr 3 '13 at 14:35












  • $begingroup$
    Vertical periodicity: $(2^mn)^2=2^{2m}n^2=n^2<<2m,$ where $a<<b$ is a shifted to the left by b binary places (i.e. the pattern is shifted upwards).
    $endgroup$
    – Loki Clock
    Apr 3 '13 at 14:37










  • $begingroup$
    I deleted my previous comment; the lengths of the rows of most significant digits are not powers of 2.
    $endgroup$
    – Loki Clock
    Apr 3 '13 at 20:26










  • $begingroup$
    Has anyone tried this for other radixes?
    $endgroup$
    – Jack M
    Apr 3 '13 at 21:22














7












7








7





$begingroup$


Here is a picture of "square numbers" from mathworld website.






A plot of the first few square numbers represented as a sequence of binary bits is shown above. The top portion shows $1^2$ to $255^2$, and the bottom shows the next 510 values. (Black is for "one" bit, and while is for "zero" bit)




I want to learn more about this pattern. However, there is no further explanation about the pattern of this plot from the website.



Is there any known result about this pattern ?










share|cite|improve this question











$endgroup$




Here is a picture of "square numbers" from mathworld website.






A plot of the first few square numbers represented as a sequence of binary bits is shown above. The top portion shows $1^2$ to $255^2$, and the bottom shows the next 510 values. (Black is for "one" bit, and while is for "zero" bit)




I want to learn more about this pattern. However, there is no further explanation about the pattern of this plot from the website.



Is there any known result about this pattern ?







number-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 23 '18 at 21:02









Glorfindel

3,41981830




3,41981830










asked Apr 3 '13 at 14:08









eigeig

32029




32029








  • 1




    $begingroup$
    Counting from the bottom from $0$, row $0$ has period two, and row $n$ when $n>0$ has period which is a divisor of $2^n$.
    $endgroup$
    – Thomas Andrews
    Apr 3 '13 at 14:30






  • 1




    $begingroup$
    It's also the case that row $n$ values are symmetric around the multiples of $2^n$ - that is, the squares of $a2^n-b$ and $a2^n+b$ have the same $n$th bit, for all $a,b$ with $b<a2^n$
    $endgroup$
    – Thomas Andrews
    Apr 3 '13 at 14:35












  • $begingroup$
    Vertical periodicity: $(2^mn)^2=2^{2m}n^2=n^2<<2m,$ where $a<<b$ is a shifted to the left by b binary places (i.e. the pattern is shifted upwards).
    $endgroup$
    – Loki Clock
    Apr 3 '13 at 14:37










  • $begingroup$
    I deleted my previous comment; the lengths of the rows of most significant digits are not powers of 2.
    $endgroup$
    – Loki Clock
    Apr 3 '13 at 20:26










  • $begingroup$
    Has anyone tried this for other radixes?
    $endgroup$
    – Jack M
    Apr 3 '13 at 21:22














  • 1




    $begingroup$
    Counting from the bottom from $0$, row $0$ has period two, and row $n$ when $n>0$ has period which is a divisor of $2^n$.
    $endgroup$
    – Thomas Andrews
    Apr 3 '13 at 14:30






  • 1




    $begingroup$
    It's also the case that row $n$ values are symmetric around the multiples of $2^n$ - that is, the squares of $a2^n-b$ and $a2^n+b$ have the same $n$th bit, for all $a,b$ with $b<a2^n$
    $endgroup$
    – Thomas Andrews
    Apr 3 '13 at 14:35












  • $begingroup$
    Vertical periodicity: $(2^mn)^2=2^{2m}n^2=n^2<<2m,$ where $a<<b$ is a shifted to the left by b binary places (i.e. the pattern is shifted upwards).
    $endgroup$
    – Loki Clock
    Apr 3 '13 at 14:37










  • $begingroup$
    I deleted my previous comment; the lengths of the rows of most significant digits are not powers of 2.
    $endgroup$
    – Loki Clock
    Apr 3 '13 at 20:26










  • $begingroup$
    Has anyone tried this for other radixes?
    $endgroup$
    – Jack M
    Apr 3 '13 at 21:22








1




1




$begingroup$
Counting from the bottom from $0$, row $0$ has period two, and row $n$ when $n>0$ has period which is a divisor of $2^n$.
$endgroup$
– Thomas Andrews
Apr 3 '13 at 14:30




$begingroup$
Counting from the bottom from $0$, row $0$ has period two, and row $n$ when $n>0$ has period which is a divisor of $2^n$.
$endgroup$
– Thomas Andrews
Apr 3 '13 at 14:30




1




1




$begingroup$
It's also the case that row $n$ values are symmetric around the multiples of $2^n$ - that is, the squares of $a2^n-b$ and $a2^n+b$ have the same $n$th bit, for all $a,b$ with $b<a2^n$
$endgroup$
– Thomas Andrews
Apr 3 '13 at 14:35






$begingroup$
It's also the case that row $n$ values are symmetric around the multiples of $2^n$ - that is, the squares of $a2^n-b$ and $a2^n+b$ have the same $n$th bit, for all $a,b$ with $b<a2^n$
$endgroup$
– Thomas Andrews
Apr 3 '13 at 14:35














$begingroup$
Vertical periodicity: $(2^mn)^2=2^{2m}n^2=n^2<<2m,$ where $a<<b$ is a shifted to the left by b binary places (i.e. the pattern is shifted upwards).
$endgroup$
– Loki Clock
Apr 3 '13 at 14:37




$begingroup$
Vertical periodicity: $(2^mn)^2=2^{2m}n^2=n^2<<2m,$ where $a<<b$ is a shifted to the left by b binary places (i.e. the pattern is shifted upwards).
$endgroup$
– Loki Clock
Apr 3 '13 at 14:37












$begingroup$
I deleted my previous comment; the lengths of the rows of most significant digits are not powers of 2.
$endgroup$
– Loki Clock
Apr 3 '13 at 20:26




$begingroup$
I deleted my previous comment; the lengths of the rows of most significant digits are not powers of 2.
$endgroup$
– Loki Clock
Apr 3 '13 at 20:26












$begingroup$
Has anyone tried this for other radixes?
$endgroup$
– Jack M
Apr 3 '13 at 21:22




$begingroup$
Has anyone tried this for other radixes?
$endgroup$
– Jack M
Apr 3 '13 at 21:22










2 Answers
2






active

oldest

votes


















3












$begingroup$

This gives the lengths of the highest black lines:



http://oeis.org/A126726






share|cite|improve this answer









$endgroup$





















    3












    $begingroup$

    Note that each line is periodic. The bottom line alternates white and black, as even and odd numbers have even and odd squares. The next line is the leading bit of the numbers $pmod 4$. As the squares $pmod 4$ go $0,1,0,1$ it will always be white. The squares $pmod {16}$ go $0,1,4,9,0,1,4,9,0,1,4,9,0,1,4,9$ so the next line up will go white, white, black, white and repeat. The next will be white, white, white, black. You can continue .






    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%2f350110%2fthe-pattern-of-bitstrings-of-square-numbers%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









      3












      $begingroup$

      This gives the lengths of the highest black lines:



      http://oeis.org/A126726






      share|cite|improve this answer









      $endgroup$


















        3












        $begingroup$

        This gives the lengths of the highest black lines:



        http://oeis.org/A126726






        share|cite|improve this answer









        $endgroup$
















          3












          3








          3





          $begingroup$

          This gives the lengths of the highest black lines:



          http://oeis.org/A126726






          share|cite|improve this answer









          $endgroup$



          This gives the lengths of the highest black lines:



          http://oeis.org/A126726







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Apr 3 '13 at 21:14









          Loki ClockLoki Clock

          1,914813




          1,914813























              3












              $begingroup$

              Note that each line is periodic. The bottom line alternates white and black, as even and odd numbers have even and odd squares. The next line is the leading bit of the numbers $pmod 4$. As the squares $pmod 4$ go $0,1,0,1$ it will always be white. The squares $pmod {16}$ go $0,1,4,9,0,1,4,9,0,1,4,9,0,1,4,9$ so the next line up will go white, white, black, white and repeat. The next will be white, white, white, black. You can continue .






              share|cite|improve this answer









              $endgroup$


















                3












                $begingroup$

                Note that each line is periodic. The bottom line alternates white and black, as even and odd numbers have even and odd squares. The next line is the leading bit of the numbers $pmod 4$. As the squares $pmod 4$ go $0,1,0,1$ it will always be white. The squares $pmod {16}$ go $0,1,4,9,0,1,4,9,0,1,4,9,0,1,4,9$ so the next line up will go white, white, black, white and repeat. The next will be white, white, white, black. You can continue .






                share|cite|improve this answer









                $endgroup$
















                  3












                  3








                  3





                  $begingroup$

                  Note that each line is periodic. The bottom line alternates white and black, as even and odd numbers have even and odd squares. The next line is the leading bit of the numbers $pmod 4$. As the squares $pmod 4$ go $0,1,0,1$ it will always be white. The squares $pmod {16}$ go $0,1,4,9,0,1,4,9,0,1,4,9,0,1,4,9$ so the next line up will go white, white, black, white and repeat. The next will be white, white, white, black. You can continue .






                  share|cite|improve this answer









                  $endgroup$



                  Note that each line is periodic. The bottom line alternates white and black, as even and odd numbers have even and odd squares. The next line is the leading bit of the numbers $pmod 4$. As the squares $pmod 4$ go $0,1,0,1$ it will always be white. The squares $pmod {16}$ go $0,1,4,9,0,1,4,9,0,1,4,9,0,1,4,9$ so the next line up will go white, white, black, white and repeat. The next will be white, white, white, black. You can continue .







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Apr 3 '13 at 21:23









                  Ross MillikanRoss Millikan

                  297k23198371




                  297k23198371






























                      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%2f350110%2fthe-pattern-of-bitstrings-of-square-numbers%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