I am currently interested in the problem
For an integer $m$, define $f(m)$ as the smallest integer $n$ such that $m \ | \ \overbrace{9999\dots9999}^{n}$
This is a property I observed after messing around with some divisibility tests. Specifically, I wrote this C program:
#include <stdio.h>
int f(int n) {
int t = 9;
int a = 1;
while (t % n != 0) {
t = ((t * 10) + 9) % n;
a += 1;
if (a > 100000) {
return -1; // break in order to not use too many cycles
}
}
return a;
}
int main() {
freopen("./out.txt", "w", stdout);
for (int i = 1; i < 100000; i += 2) {
if (i % 5 != 0) { //looping over odd integers so no need to check for i % 2 == 0
int b = f(i);
if (i - b == ){
printf("%d\n", i);
}
// printf("f(%d) = %d\n", i, f(i));
}
}
return 0;
}
to test if there is an integer $n$ for the conjecture for $n$ up to $10^5$ and $5 \not | \ n$. So far, all the results are positive, so this is why I decide to dive deeper. If you are interested in this problem, here are the values for $n$ and $f(n)$ with $n$ up to $10^5$ separated by a space
Hypothesis: $f(m)$ exists for all odd integer $m$ not divisible by $5$
With this, I decide to dive further into the output.
Sub-hypothesis: There exists infinitely many $m$ such that $f(m) = m - 1$
I extended the program to loop up to $10^5 = 100000$, and I noticed that there are certain values for $n$ that $f(n) = n - 1$ (e.g. $ n = 7$). So I decide to extend the program into finding all such integers, and I found the following integers $n$ up to $10^5$ satisfying the equation. What's interesting is that up to $10^5$, $n = 3$ is the only integer satisfying $f(n) = n - 2$, and there are no $n$ satisfying $f(n) = n - a$ where $a = 3, 4, $ or $5$.
I'd love to get reference material and/or more intuition on this problem. What do you think?