4

Given is this function:

$$ m=\mathrm{gcd}(n^a+b,(n+1)^a+b)\\ a,b,c\in\mathbb{N} $$

On OEIS A118119, for $2\leq a\leq 84$ and $b=1$, the smallest values for $n$ in each case where this expression is greater than 1 are given. Comparable lists for $b=2$ to $b=19$ are OEIS A255852 to OEIS A255869. Among them you can find quite large values for n. For example OEIS A255852 says (not in the actual list, but in the comment) that the smallest $n$ in the case of $a=47,b=2$ is a number with 320 decimal places.

I am most interested in values of $m$ that are composite numbers, because that would help me a lot in solving another problem. (See also my comment at the end of my question.)

The values for $m$ are not shown in the tables linked above, but you can easily work them out for yourself. For example, I get these values:

$$ a=8, b=18, n=5 \rightarrow m=187 = 11\cdot 17\\ \mathrm{gcd}(5^{8}+18,(5+1)^{8}+18)=187\\ \,\\ a=9, b=8, n=5 \rightarrow m=11557 = 7\cdot 13\cdot 127\\ \mathrm{gcd}(5^{9}+8,(5+1)^{9}+8)=11557\\ \,\\ a=50, b=1, n=2 \rightarrow m=12625 = 5^3\cdot 101\\ \mathrm{gcd}(2^{50}+1,(2+1)^{50}+1)=12625\\ \,\\ a=72, b=1, n=2 \rightarrow m=55969=97\cdot 577\\ \mathrm{gcd}(2^{72}+1,(2+1)^{72}+1)=55969 $$

But as soon as $n$ becomes bigger, all values listed in the 20 tables mentioned above, result in values for $m$ that are prime. Here is an examples:

$$ a=9, b=16, n=5982 \rightarrow m=31177\,\,\mathrm{is\,prime}\\ \mathrm{gcd}(5982^{9}+16,(5982+1)^{9}+16)=31177 $$

I am interested in those combinations of $a$ and $b$, where $n$ has more than about 20 decimal digits. But in all of the cases listed in the tables, I always get prime numbers for $m$:

$$ a=23, b=13, n=320594291825643656342 \rightarrow m=735616280024182244143\,\,\mathrm{is\,prime}\\ \,\\ a=17, b=9, n=8424432925592889329288197322308900672459420460792433 \rightarrow m=8936582237915716659950962253358945635793453256935559\,\,\mathrm{is\,prime}\\ \,\\ a=19, b=6, n=1578270389554680057141787800241971645032008710129107338825798 \rightarrow m=5299875888670549565548724808121659894902032916925752559262837\,\,\mathrm{is\,prime} $$

My Questions:

  1. Why is it the case, that composite numbers for $m$ appear only for small values of $n$?
  2. Is there a combination of $a$ and $b$ not listed in the tables mentioned above, such that $n$ has more than 20 digits and $m$ is a composite number?

Comment, not part of the question:

Why am I searching for composite numbers for $m$ when $n$ is large?

This has to do with another question I asked a few days ago.

Let's assume that the smallest $n$ for $a=40, b=12$ where $m=\mathrm{gcd}(n^a+b,(n+1)^a+b)$ is greater than 1 has the value $N>10^{20}$ and the value of $m$ in this case is $M$ where $M=2\cdot M'$. Then I could write these two Python programs:

# tests only odd values for n
import math
n = 1
gcd = 1
while gcd == 1:
    n += 2
    gcd = math.gcd(n ** 40 + 12, (n + 1) ** 40 + 12)

and

# tests only even values for n
import math
n = 2
gcd = 1
while gcd == 1:
    n += 2
    gcd = math.gcd(n ** 40 + 12, (n + 1) ** 40 + 12)

Then only one of these programs would halt when it reaches $n=N$ while the other would run forever.

  • In your closing comment, it seems likely that both of those programs halt: Given (a,b), there's typically an infinite sequence of "critical n-values", i.e. n such that gcd(f(n),f(n+1))>1, and typically they don't all have the same parity; consequently, whichever program halts when it hits the smallest critical n-value (N), the other program will halt when it hits the smallest critical n-value of opposite parity. – r.e.s. Jan 24 '23 at 20:01

0 Answers0