For $n$ and $m$ positive integers $n>m\ge 1$ define a graph as follows. The vertices are the binary strings of length $n$. Two vertices are adjacent if they differ in exactly $m$ consecutive bits. The indices of the $m$ consecutive positions where $x$ and $y$ differ from each other are considered modulo $n$. Just to clarify, if $n=6$ and $m=4$ we consider that $x=100101$ and $y=010110$ are adjacent since they differ from each other in positions 5, 6, 1 and 2.

The resulting graph has $2^n$ vertices and $n\cdot 2^{n-1}$ edges. Clearly, for $m=1$ one obtains the regular $n$-dimensional hypercube. What is the number of connected components of this graph for general $m$ and $n$?

The problem arose during a discussion in the graph theory class I am teaching this semester. I believe the problem has been considered before, but I was unable to locate any reference.