3

While researching the topic of Descartes numbers, I came across the following seemingly related subproblem:

PROBLEM: Determine conditions on $n$ such that $$\frac{{10}^n - 1}{9}$$ is squarefree.

MY ATTEMPT

Set $$m := \frac{{10}^n - 1}{9}.$$

(Note that $m$ is called a repunit. Searching for the keyword "squarefree" in this Wikipedia page did not return any results.)

I noticed that $m$ is squarefree for $n = 1$.

So, let $n > 1$. I also observed that, for $n \geq 2$, we actually have $$m \equiv 3 \pmod 4,$$ so that $m$ is not a square.

Next, I considered the prime factorizations of $m$ for the first dozen $n \neq 1$: $$\begin{array}{c|c|c|} \text{Value of } n &\text{Repunit } m & \text{Prime Factorization of } m \\ \hline 2 & 11 & 11 \\ \hline 3 & 111 & 3 \times 37 \\ \hline 4 & 1111 & 11 \times 101 \\ \hline 5 & 11111 & 41 \times 271 \\ \hline 6 & 111111 & 3 \times 7 \times 11 \times 13 \times 37 \\ \hline 7 &1111111 & 239 \times 4649 \\ \hline 8 & 11111111 & 11 \times 73 \times 101 \times 137 \\ \hline 9 & 111111111 & 3^2 \times 37 \times 333667 \\ \hline 10 & 1111111111 & 11 \times 41 \times 271 \times 9091 \\ \hline 11 & 11111111111 & 21649 \times 513239 \\ \hline 12 & 111111111111 & 3 \times 7 \times 11 \times 13 \times 37 \times 101 \times 9901 \\ \hline 13 & 1111111111111 & 53 \times 79 \times 265371653 \\ \hline \end{array}$$

From this initial data sample, I predict the truth of the following conjectures:

  • CONJECTURE 1: If $n \equiv 0 \pmod 6$, then $m$ is squarefree.
  • CONJECTURE 2: If $n \equiv 0 \pmod 6$, then $\bigg(3 \times 7 \times {11} \times {13} \times {37}\bigg) \mid m$.
  • CONJECTURE 3: If $n \equiv 0 \pmod 3$, then $\bigg(3 \times {37}\bigg) \mid m$.

I skimmed through OEIS sequence A002275 and did not find any references to these conjectures.

RESOLVING CONJECTURE 1

I searched for counterexamples to Conjecture 1 using Pari-GP in Sage Cell Server, I got the following output in the range $n \leq 50$:

18[3, 2; 7, 1; 11, 1; 13, 1; 19, 1; 37, 1; 52579, 1; 333667, 1]
36[3, 2; 7, 1; 11, 1; 13, 1; 19, 1; 37, 1; 101, 1; 9901, 1; 52579, 1; 333667, 1; 999999000001, 1]
42[3, 1; 7, 2; 11, 1; 13, 1; 37, 1; 43, 1; 127, 1; 239, 1; 1933, 1; 2689, 1; 4649, 1; 459691, 1; 909091, 1; 10838689, 1]

This output means that

  • $\dfrac{{10}^{18} - 1}{9}$ is divisible by $3^2$.
  • $\dfrac{{10}^{36} - 1}{9}$ is divisible by $3^2$.
  • $\dfrac{{10}^{42} - 1}{9}$ is divisible by $7^2$.

I therefore conclude that Conjecture 1 is false.

MY ATTEMPT TO RESOLVE CONJECTURE 2

I searched for counterexamples to Conjecture 2 using Pari-GP in Sage Cell Server, I got a blank output in the range $n \leq {10}^5$.

The Pari-GP interpreter of Sage Cell Server crashes as soon as a search limit of ${10}^6$ is specified.

This gives further computational evidence for Conjecture 2.

MY ATTEMPT TO RESOLVE CONJECTURE 3

I searched for counterexamples to Conjecture 3 using Pari-GP in Sage Cell Server, I got a blank output in the range $n \leq {10}^5$.

The Pari-GP interpreter of Sage Cell Server crashes as soon as a search limit of ${10}^6$ is specified.

This gives further computational evidence for Conjecture 3.


Alas, this where I get stuck, as I do not currently know how to prove Conjectures 2 and 3.

INQUIRY

Given that Conjecture 1 is false, do you know of or can you prove a(n) (unconditional) congruence condition on $n$ which guarantees that the repunit $m$ is squarefree?

  • 3
    (+1) Very good experimental maths protocol. Thanks – Duchamp Gérard H. E. Feb 01 '22 at 07:16
  • 1
    Determining whether a number is squarefree is believed to be as difficult as factoring. So, in most cases, we can only show that a given repunit is not squarefree, but probably not that it is squarefree. With a little trick , we can however determine for large $n$ and $p$ , whether we have $p^2\mid R_n$. Note that for every prime $p>5$ , there are infinite many $n$ with $p^2\mid R_n$ – Peter Feb 01 '22 at 08:12
  • I searched for the keyword "repunit" in that Wikipedia page, @miracle173, and it returned an empty result. – Jose Arnaldo Bebita Dris Feb 01 '22 at 08:12
  • Would you mind fleshing out your last comment as an actual answer, @Peter, so that I can upvote it? Thanks! – Jose Arnaldo Bebita Dris Feb 01 '22 at 08:15
  • 1
    @ArnieBebita-Dris If $n>3$ is prime, then the prime factors must have the form $kn+1$ increasing the chance that $R_n$ is squarefree. Whether this is always the case is another interesting question. – Peter Feb 01 '22 at 08:36
  • Thank you for your time and attention, @Peter! I will take it from here. – Jose Arnaldo Bebita Dris Feb 01 '22 at 08:37
  • @ArnieBebita-Dris I misread this part of your post. – miracle173 Feb 01 '22 at 14:26

4 Answers4

3

If $p$ is a prime coprime to $10$ , we have $$10^{p(p-1)} \equiv 1\mod p^2$$ because of Euler's theorem and therefore $$10^{kp(p-1)} \equiv 1\mod p^2$$ for every positive integer $k$

Hence , for every prime $p>5$, there are infinite many $n$ such that $p^2\mid R_n$

Whether $p^2\mid R_n$ holds for $p>5$ can be checked in PARI/GP with

lift(Mod(10,p^2)^n-1)==0
Peter
  • 86,576
2

Conjecture 2 is easy to verify using the fact that $u-1$ is a factor of $u^k-1$, so that $x^6-1$ divides $x^{6k}-1$, so that $10^6-1=3^3\cdot7\cdot11\cdot13\cdot37$ divides $10^n-1$ when $6$ divides $n$. Conjecture 3 is similar with the $6$s replaced by $3$s.

For similar reasons, Conjecture 1 is false: if any $\frac{10^m-1}9$ is ever nonsquarefree, then its multiple $\frac{10^{6m}-1}9$ will also be nonsquarefree. The first counterexamples are $\frac{10^{18}-1}9$ and $\frac{10^{36}-1}9$ (both of which are divisible by $3^2$) and $\frac{10^{42}-1}9$ (divisible by $7^2$).

Greg Martin
  • 92,241
2

Conjectures 2 and 3 are rather simple to prove. More generally the following holds $$m(n)|m(kn)\tag 1$$

To get $m(n)$ you simply append a $1$ on the digit string of $m(n−1)$, so $$m(n)=10m(n−1)+1$$

Note that $$m(n)=\sum_{i=0}^{n-1}10^{i}$$

so we have

$$m(kn)=\sum_{i=0}^{kn-1}10^i =\sum_{j=0}^{k}\sum_{i=jn}^{n(j+1)-1}10^i =\sum_{j=0}^{k}\sum_{i=0}^{n-1}10^{jn+i}=\sum_{j=0}^{k}10^{jn}\sum_{i=0}^{n-1}10^{i}=m(n)\sum_{j=0}^{k}10^{jn}$$ which proves $(1)$.

miracle173
  • 11,359
0

Lengths of nonsquarefree repunits suggest that $$\dfrac{10^{9k}-1}{9},\dfrac{10^{22k}-1}{9},\dfrac{10^{42k}-1}{9},\dfrac{10^{78k}-1}{9},\dfrac{10^{111k}-1}{9},\dfrac{10^{205k}-1}{9},\dfrac{10^{272k}-1}{9}$$ are not squarefree where $k$ is a positive integer.


$\dfrac{10^{9k}-1}{9},\dfrac{10^{22k}-1}{9},\dfrac{10^{42k}-1}{9},\dfrac{10^{78k}-1}{9}$ are not squarefree since $$3^4\mid 10^9-1,\quad 11^2\mid 10^{22}-1,\quad 7^2\mid 10^{42}-1,\quad 13^2\mid 10^{78}-1$$ hold.

mathlove
  • 151,597