3

Given an integer $n$, how much do we know and how much can we know about the prime factors of $n+1$ without actually factoring it?

An example from the comments: If $n = 3^{4k+2}$, then $n+1$ is divisible by 5. Is there a general theory describing all we can know about the factors of $n+1$ without factoring it? Or theories describing this behavior for a nontrivial subset of the integers?

L. E.
  • 483
  • 2
    In the example you gave, we know that $n + 1$ has no chance of being divisible by 3 or 7. In general, $n$ and $n + 1$ have no prime factors in common. I don't think much more is known but I am not expert in this area. – Michael Lugo Sep 20 '23 at 13:46
  • 2
    Wait a moment... "has a 1/2 chance of being divisible by 3"? Why do you say that $n+1$ is not even but you think there is still a chance of it being or not being divisible by $3$? Perhaps you mean to talk about "has a chance of being divisible by $p$" where $p$ is not a factor of your number. – JMoravitz Sep 20 '23 at 13:46
  • 2
    Now... another nitpick, "given a random integer $n$" This is ambiguous and imprecise, and the naive interpretation here is impossible. You can not have a uniform random distribution over a countably infinite set. So then, what distribution do we have since it can not be uniformly random? If it is a distribution such that we only ever pick numbers that are $1$ less than a multiple of $5$, then I can say with 100% certainty that the successor is a multiple of $5$... – JMoravitz Sep 20 '23 at 13:49
  • Sorry, I got utterly confused. I meant to make that observation about the primes not present in the factorization. – L. E. Sep 20 '23 at 13:50
  • @JMoravitz I'm not sure. The spirit of it is that I would like for the answer to say something about all integers. What would be a suitable way to characterize $n$ then? – L. E. Sep 20 '23 at 13:52
  • 1
    Your inferences only require knowing which prime $p$ divide $n$; their orders as factors are unnecessary. What you're saying is, for $p\in\Bbb P$, the probability that $p|n+1$ is $0$ given $p|n$, or $1/(p-1)$ given $p\nmid n$. This formulation lets us sidestep the question of what random means. – J.G. Sep 20 '23 at 13:53
  • Now... to try to make some sense of what one might have hoped for from a "uniform distribution over the natural numbers"... we could talk about the relative density of certain classes of numbers... where here we can say things such as "The relative density of numbers divisible by $5$ in the integers is $\frac{1}{5}$" by considering $\lim\limits_{n\to\infty}\dfrac{|{k~:~1\leq k\leq n,~5\mid k}|}{|{k~:~1\leq k\leq n}|}$ – JMoravitz Sep 20 '23 at 13:54
  • You can say more, if you're willing to look at the prime factors of $n$ modulo other primes; for instance, with your example $n$, I can see there's a probability of $1$ that $n+1$ is divisible by $5$. But I'm not sure if this is what you're looking for (I guess it's more about the definition of random being used, per your other discussion) – Chris Lewis Sep 20 '23 at 13:57
  • @ChrisLewis I think that's the sort of thing I want to ask, but I'm hesitant about saying something like "given the prime factors of $n$ modulo any prime..." since it seems like it would lead to trivial answers. Is this the case? – L. E. Sep 20 '23 at 14:00
  • Now, I don't think a probabilistic approach is appropriate here. We can learn things about successors of numbers from their factorization if we work hard enough. For instance, I know that $3^{4k+2}+1$ must be a multiple of $5$ without factoring from modular arithmetic. I also know that the number in your example which is 7 digits in length, its successor is not divisible by any prime that is, say, 10 digits in length, and further that it can not be divisible by multiple primes that are 4 digits in length, so the events you consider are not independent. – JMoravitz Sep 20 '23 at 14:01
  • @JMoravitz I agree that I don't particularly want to ask about probabilistic results. I just felt like I had to include it in the question because it was the only thing I could think about and the question could have been downvoted otherwise :( I'll edit with your example. – L. E. Sep 20 '23 at 14:05
  • We can certainly say a lot of cases like what you have written - for example of one variant, $3^{a_1}13^{a_2}23^{a_3}+1$ is divisible by $5$ if $a_1+a_2+a_3\equiv 2\pmod 4.$ But these don't generalize to talking about general $n,$ not general primes. – Thomas Andrews Sep 20 '23 at 14:18
  • In general, if we know the primes $p_1,\dots,p_k$ are the prime divisors of $n,$ it is hard to exclude any prime divisors of $n+1$ other than those primes. If there is a prime $q\equiv 3\pmod 4$ and each $p_i$ is a square modulo $q,$ then $q$ cannot be a prime factor of $q+1.$ So, for example, $q=7$ then if all the prime divisors of $n$ are $\equiv1,2,4\pmod7,$ then $n+1$ cannot be divisible by $7$. So, for example, $2^a11^b29^c+1$ is never divisible by $7.$ – Thomas Andrews Sep 20 '23 at 14:27
  • But otherwise, given $p_1,p_2,\dots,p_k,q$ distinct primes, and and some $p_i$ is not a square, modulo $q,$ we can find an $n$ which has $p_1,\dots,p_k$ as the unique prime factors such that $n+1$ is divisible by $q.$ – Thomas Andrews Sep 20 '23 at 14:31
  • In general, if $\frac{q-1}{2^r}$ is odd, and each of $p_1,\dots,p_k$ is a $2^r$th power, modulo $q,$ there is no $n$ with $n+1$ divisible by $q.$ For example, $q=13$ then $r=2$ and you need $p_i\equiv 1,3, 9.$ Then there is no $n=3^a53^b61^c$ such that $n+1$ is divisible by $13.$ – Thomas Andrews Sep 20 '23 at 14:41
  • 1
    In general, the only thing we could say about the prime factors of $n+1$ is that none of them are also prime factors of $n$. Given any two disjoint sets of primes $P$ and $Q$, there is always a number $n$ for which $n$ is divisible by the primes in $P$ (and possibly more) and $n+1$ is divisible by the primes in $Q$ (and possibly more) by the Chinese Remainder Theorem. – Geoffrey Trang Sep 20 '23 at 14:41
  • The short answer is : nothing. We can only rule out the prime factors of $n$ for $n-1$ and $n+1$. If there would be any relation allowing us to factor the neighbours , we could efficiently factor all numbers , in particular the fermat numbers , we would even have an immediate primality test for , say , the $33$ rd fermat number. – Peter Sep 20 '23 at 15:01
  • 1
    One thing to think about: if we understood this well enough, the famous Collatz conjecture would be solved. The Collatz conjecture comes down to: what happens to the number of 2's in the prime factorization of an odd number after we add a factor of 3 and then increment? This is a fairly restricted version of your question and even this is famously elusive. – Charles Hudgins Sep 21 '23 at 00:03
  • 1
    Related: https://math.stackexchange.com/questions/2694/what-is-the-importance-of-the-collatz-conjecture – AlephBeth Sep 21 '23 at 08:27

2 Answers2

5

There is not much known in general.

Aside from the obvious - the prime factors of $n$ are distinct from the prime factors of $n+1$ - we cannot say much.

We can exclude other prime factors of $n+1$ only in a few cases.

If $p_1,\dots,p_k,q$ are distinct primes, and $r=\nu_2(q-1)$ is the highest integer such that $2^r\mid q-1,$ then we have the result:

There does not exist $n$ with the unique prime factors $p_1,\dots,p_k$ with $n+1$ divisible by $q$
iff,
for each $i,$ we can solve the congruence $x_i^{2^r}\equiv p_i\pmod q.$

If, for example, there is no $x_1,$ then $p_1$ has an even multiplicative order, $2m,$ modulo $q,$ and $n=p_1^mp_2^{q-1}p_3^{q-1}\cdots p_k^{q-1}$ has $n+1$ divisible by $q.$

On the other hand, if there is an $x_i$ for each $i,$ then $n$ will always be a $2^r$th power modulo $q,$ and $-1$ is never a $2^r$th power modulo $q.$

For example, if $q=13,$ $r=2,$ and we find the fourth powers modulo $13$ are $1,3,9.$ So if all the prime factors of $n$ are $\equiv1,3,9\pmod{13},$ then $13$ cannot be a factor of $n+1.$ But if any prime factor is not one of these, then we can find an $n.$


The abc Conjecture would say that, for any $\alpha<1,$ there are at most finitely many $n$ such that the product of the distinct prime factors of $n(n+1)$ is less than $(n+1)^\alpha.$ But that is still only a conjecture.

This obviously is not true for $\alpha=1.$ For example, $n=2^{6k}-1$ is divisible by $9,$ so the product of the prime factors of $n$ and $n+1$ is at most $\frac23n<n+1.$

Thomas Andrews
  • 177,126
4

One special case is when $n+1$ is prime, and then knowing the prime factorization of $n$ can be helpful in proving that $n+1$ is prime.

Suppose for each prime factor $p_i$ of $n$ we can find $b_i$ such that:

$$\begin{align*} b_i^n &\equiv 1 \bmod (n+1), \text{ but } \\b_i^{n/p_i} &\not\equiv 1 \bmod (n+1) \end{align*}$$

Then $n+1$ is prime, because it follows that $\varphi(n+1) = n$, i.e. all positive integers less than $n+1$ are relatively prime to $n+1$.

An important improvement on this when only a partial factorization of $n$ is known is due to H.C. Pocklington (1914). Bressoud's Factorization and Primality Testing, Chapter 9 (Primitive Roots and a Test for Primality) gives details and references.

hardmath
  • 37,015