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 ?

$\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
3
$\begingroup$

This gives the lengths of the highest black lines:

http://oeis.org/A126726

$\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 .

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.