TITLE: Why are the eigenvalues of these "bitwise XOR matrices" integers?
QUESTION [13 upvotes]: In the course of playing around with this question, I have hit upon a question of my own.
Consider the $n\times n$ symmetric matrix $\mathbf X$ whose entries are given by $x_{j,k}=(j-1)\mathbin{\mathrm{XOR}}(k-1)$, where $\mathrm{XOR}$ is bitwise XOR. (As noted in the other question, the matrix is essentially the Cayley table for nimber addition.)
Looking at the eigenvalues of $\mathbf X$ when $n$ is a power of $2$, I have observed a few things with the first few members:

All the eigenvalues are integers
If $n=2^m$, then there are $m+1$ nonzero eigenvalues.
Of the $m+1$ nonzero eigenvalues, one is positive, and the other eigenvalues are negative.
The positive eigenvalue of the $2^m \times 2^m$ matrix $\mathbf X$ is $2^{m-1}(2^m-1)$.
The $m$ negative eigenvalues of $\mathbf X$ are the negatives of the powers of $2$ between $2^{m-1}$ and $2^{2m-2}$, inclusive.

(For those who want to try it out in Mathematica: Table[Eigenvalues[Array[BitXor, {2^n, 2^n}, {0, 0}], n + 1], {n, 8}])
Is there a simple explanation for these observations?

REPLY [2 votes]: This is not yet an answer but I like everything I've seen so far in experimenting with this question. Just for the record - here is the list of eigenvalues for dimensions 2 to 32.     
$ \qquad \small 
\begin{array} {r|rrrrrr} 
 n & \lambda_0 &  \lambda_1 &  \lambda_2 &  \lambda_3 & \ldots  \\ 
\hline \\
 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
 2 & 1.00000 & -1.00000 & 0 & 0 & 0 & 0 & 0 \\
 3 & 4.11309 & -3.20191 & -0.911179 & 0 & 0 & 0 & 0 \\
 4 & 6.00000 & -4.00000 & -2.00000 & 0 & 0 & 0 & 0 \\
 5 & 14.5045 & -9.00554 & -3.58620 & -1.91276 & 0 & 0 & 0 \\
 6 & 19.4007 & -12.7896 & -3.61105 & -3.00000 & 0 & 0 & 0 \\
 7 & 24.1164 & -14.2248 & -6.83415 & -3.05741 & 0 & 0 & 0 \\
 8 & 28.0000 & -16.0000 & -8.00000 & -4.00000 & 0 & 0 & 0 \\
 9 & 49.6139 & -24.4997 & -13.6182 & -7.57719 & -3.91876 & 0 & 0 \\
 10 & 62.8155 & -35.9022 & -14.2844 & -7.62891 & -5.00000 & 0 & 0 \\
 11 & 74.0458 & -43.7856 & -14.3322 & -10.7731 & -5.15484 & 0 & 0 \\
 12 & 83.5162 & -51.1273 & -14.3889 & -12.0000 & -6.00000 & 0 & 0 \\
 13 & 94.1939 & -53.6516 & -22.1227 & -12.2067 & -6.21279 & 0 & 0 \\
 14 & 103.443 & -56.8879 & -27.3301 & -12.2248 & -7.00000 & 0 & 0 \\
 15 & 112.117 & -60.2314 & -29.8447 & -14.7815 & -7.25961 & 0 & 0 \\
 16 & 120.000 & -64.0000 & -32.0000 & -16.0000 & -8.00000 & 0 & 0 \\
 17 & 171.867 & -73.7456 & -45.2712 & -29.3182 & -15.6086 & -7.92300 & 0 \\
 18 & 206.909 & -97.7047 & -54.2836 & -30.2568 & -15.6638 & -9.00000 & 0 \\
 19 & 235.941 & -121.404 & -56.1933 & -30.3942 & -18.7220 & -9.22729 & 0 \\
 20 & 260.889 & -143.387 & -57.0271 & -30.4750 & -20.0000 & -10.0000 & 0 \\
 21 & 285.172 & -159.208 & -57.1153 & -38.0783 & -20.4854 & -10.2847 & 0 \\
 22 & 306.935 & -175.009 & -57.2218 & -43.0863 & -20.6174 & -11.0000 & 0 \\
 23 & 327.175 & -189.915 & -57.3281 & -45.8065 & -22.8020 & -11.3230 & 0 \\
 24 & 345.906 & -204.451 & -57.4546 & -48.0000 & -24.0000 & -12.0000 & 0 \\
 25 & 368.769 & -209.111 & -74.0415 & -48.6899 & -24.6126 & -12.3138 & 0 \\
 26 & 389.681 & -214.564 & -88.4471 & -48.8194 & -24.8500 & -13.0000 & 0 \\
 27 & 409.338 & -220.649 & -99.6532 & -48.8630 & -26.8285 & -13.3448 & 0 \\
 28 & 427.728 & -227.530 & -109.308 & -48.8902 & -28.0000 & -14.0000 & 0 \\
 29 & 446.112 & -233.927 & -114.351 & -54.7713 & -28.7024 & -14.3607 & 0 \\
 30 & 463.458 & -240.919 & -119.376 & -59.1247 & -29.0380 & -15.0000 & 0 \\
 31 & 480.118 & -248.234 & -123.848 & -61.8143 & -30.8469 & -15.3747 & 0 \\
 32 & 496.000 & -256.000 & -128.000 & -64.0000 & -32.0000 & -16.0000 & 0
 \end{array}$
These are also the singular values. It is possible to compute a cholesky-decomposition of the matrix $\small A^2 $. That the sets of eigenvectors are submatrices of Hadamard-matrices was already mentioned in Jyrki's comment and makes things even more interesting...