Why do all parasitic numbers seem to be multiples of repunits?

46 Views Asked by At

Let $n$ be a number. Take the last digit of $n$ and move it to the front to produce a new number $m$. If $n$ divides into $m$, then we call $n$ a parasitic number (in base 10). For example, $n = 102564$ is a parasitic number because, after taking the rightmost digit and moving it to the left, we get $m = 410256$, which is four times $n$.

Wikipedia has a list of small parasitic numbers, as well as an algorithm to reliably generate more of them. Wikipedia also separates parasitic numbers into categories based on the multiple of the original number produced, so our $n = 102564$ example above would be called a $4$-parasitic number, since we get four times the number after shifting a digit.

But what I'm interested in is this. There seems to be some complex interplay between $k$-parasitic numbers and repunits. Specifically, most parasitic numbers seem to be multiples of several repunits. And, for some fixed $k$, all $k$-parasitic numbers are multiples of the same repunits.

Write $r_m$ to indicate the repunit of length $m$, so $r_1 = 1, r_2 = 11, r_3 = 111, r_4 = 1111, ...$

I wrote a quick computer script to analyze all of the primitive (read: generated by the algorithm on Wikipedia without using concatenation of smaller results) $k$-parasitic numbers in base 10, and here's what I found.

  • There are eight primitive $2$-parasitic numbers. All of them are divisible by $r_2, r_3, r_6, r_9$.
  • There are seven primitive $3$-parasitic numbers. All of them are divisible by $r_2, r_4, r_7, r_{14}$.
  • There are six primitive $4$-parasitic numbers. All of them are divisible by only $r_2$ and $r_3$.
  • There are five primitive $5$-parasitic numbers. All of them are divisible by $r_2, r_3, r_7, r_{14}, r_{21}$, with the exception of $142857$, which is only divisible by $r_2$ and $r_3$.
  • There are four primitive $6$-parasitic numbers. All of them are divisible by $r_2$ and $r_{29}$.
  • There are three primitive $7$-parasitic numbers. All of them are divisible by $r_2$ and $r_{11}$.
  • There are two primitive $8$-parasitic numbers. They are never divisible by any repunits.
  • There is one primitive $9$-parasitic number, which is divisble by $r_2, r_4, r_{11}, r_{22}$.

There's too much consistency here for there not to be a pattern. With the exceptions of $k = 5$ and $k = 8$, all of the $k$-parasitic numbers are divisible by the same repunits, and in each case they're divisible by at least two distinct repunits. Excluding $142857$, the same is true of $k = 5$. And then $k = 8$ just doesn't fit the pattern at all.

So what is the pattern here? Given a $k$, how do we know which repunits will divide the $k$-parasitic numbers? Why do $k = 5$ and (especially) $k = 8$ not fit into this pattern? And, for bonus points, how does the pattern extend to the definition of a "parasitic number" in some other numerical base than base 10?