Let's define a function $g(x)$ as follows:
$g(x)=-x+\displaystyle\sum_{\substack{3\le p\le x/2}\\{p \text{ prime}}}{\log_2 \left( \text{LeastPrimeFactor} \left( \frac{16^p-1}{15} \right) \right) }$
This function comes from a specific rabbit-hole of investigation around the Freudenthal Problem. I want to know if $\liminf g(x) > 0$. This leads directly to the question in the title.
The sum ranges over odd primes less than $x/2$, so the crux of the problem is finding the factors of Mersenne numbers, which makes me immediately think this is out of reach. However, I've seen some heuristics discussed that make it seem like there might be a way forward.
Naively, we know 4 factors of $16^p-1$:
- $2^p-1$
- $2^p+1$
- $2^p-2^\frac{1+p}{2}+1$
- $2^p+2^\frac{1+p}{2}+1$
These are all of order $2^p$, one is divisible by 5 and another by 3, but there are not guaranteed factors beyond this. Plugging them in gives us the sum of all odd primes up to $x/2$, dominating the $-x$ and leading to $+\infty$.
On the other hand, for $p\ge 7$ we know the lower bound for the least prime factor of this expression is $2p+1$, a bound which is attained quite often. Summing $\log_2 \left( 2p+1 \right)$ gives something $O(x)$, and if we replace it throughout, $g(x)$ tends to $-\infty$.
Using actual data, mostly scraped from Will Edgington's database and assembled in Mathematica, it looks like the big factors eventually start winning. Of course, I'm hesitant to make claims using only data, particularly when discussing not-yet-found factors. For example, when $p=2267$, it seems that we know one prime factor with 40 digits and haven't proven that it is the least prime factor. But when $p=11423$, we don't know any prime factors!
Is there some reasonable way to predict in-bulk, the expected behavior of the least prime factors of these Mersenne-adjacent numbers? If so, what does it predict about $g(x)$?
Edit: I tried my hand at a probabilistic number theory approach.
The progression $2np+1$ includes all factors of $(16^p-1)/15$.
The size of the $k$th prime in that progression goes as $2pk \log(2pk) / \log(2p)$, but the log of that value can be approximated reasonably as $\log(2pk)$.
The upper limit of $k$ is $2^p$ due to the known factors. You could also put $2^{p/2}$ here and the expressions below would not change at leading order.
Some integrals show that
- $\int^{2^p} \frac{1}{k} \,dk \rightarrow p \log 2$
- $\int^{2^p} \frac{1}{k \log k} \,dk \rightarrow \log p$
- $\int^{2^p} \frac{1}{k \log^2 k} \,dk \rightarrow 1/\log 2$.
If I follow the argument in Expected smallest prime factor with appropriate generality, I think the probability the $k$th prime in the progression is the smallest prime factor, goes as $\frac{1}{k \log^2 k}$.
This gives rise to an expectation value for $\log_2 \left( \text{LeastPrimeFactor} \left( 2^p-1 \right) \right)$ that is $(1 + 1/\log2)\log p + O(\log \log p)$, and a variance that is $O(p)$.
This might be a classic result? Or it might be an erroneous result. But converting the base it sounds like the expected number-of-bits in the smallest factor of the $p$th Mersenne number is $1 + \log 2 = 1.69315..$ times the number of bits in $p$ itelf.
The variance is large, and the distribution has a hard minimum of $\log(2p+1)$, so among many samples of this distribution there will be cases where the log of the factor is itself $O(\sqrt{p})$.
Now, the log-least-prime-factor of $(16^p - 1)/15$ would be the minimum of 4 reasonably-independent draws from this distribution, so it avoids the $O(\sqrt{p})$ draws with higher likelihood. But by this point I feel like the approximations and assumptions are going to catch up with me before I get anywhere.
So, I'd like to have help with continuing/refining this argument until it can predict something reasonably useful about $g(x)$.