1

Let $a,b,n$ be positive integers. If $a$ and $b$ are coprime, then is $\gcd(an + 1, bn) = 1$ for infinitely many integers $n$?

Clearly the result doesn't have to hold for all $n$; take $n = 3, a = 5, b = 4.$ Also, $\dfrac{an+1}{bn}\to \dfrac{a}b$ as $n\to\infty$, but I'm not sure if this is useful. I know that to show two numbers are coprime it suffices to show that there's no prime dividing both of them or that an integer linear combination of the two numbers equals one.

Gary
  • 31,845
Gord452
  • 1,127
  • @David The OP is asking if the gcd is 1 "for $n$ sufficiently large." I think this is unambiguous, no? It means that there is some $N$ so that for all $n \geq N$, the gcd of $an+1$ and $bn$ is $1$---proof or counterexample. – Stephen Aug 10 '22 at 00:22
  • 3
    Say $a=1, b=2$ and that $n$ is a very large odd number. Then the gcd in question is $2$, however large $n$ is. – lulu Aug 10 '22 at 00:22
  • @Gord452 With your updated question, consider $n=bk$ where $k$ is any positive integer. – John Omielan Aug 10 '22 at 02:33
  • By Euclid, $,(an!+!1,n)=1\Rightarrow (an!+!1,bn) = (an!+!1,b),,$ which is $1$ for infinitely many $n,$ (since $(a,1,b)=1),,$ by Stieltjes' simple method in the Theorem in the linked dupe. – Bill Dubuque Aug 10 '22 at 06:27
  • 1
    It's not really fair to the people who answer your question to then delete it (thanks for undeleting it); it's actually even worse to edit it so that the question changes and the existing answer is no longer correct (see what happened below). I would ask a new question in the future if I were you. – Stephen Aug 10 '22 at 15:25

2 Answers2

2

If $n$ is a multiple of $ab$ i.e. $n=kab$ for some positive integer $k$, then the only prime factors that would divide $bn$ are the prime factors of $a$, $b$, and $k$, and $an+1$ wouldn't be divisible by any of these prime factors (it is $1$ in modular $a$, $b$, and $k$), therefore the two quantities are relatively prime. So the answer to your question is yes.

  • Note that, somewhat more generally, $n = kb$ works (i.e., your solution is a subset with my $k$ replaced with your $ka$), as I suggested in my question comment. – John Omielan Aug 10 '22 at 03:00
  • 1
    ah i see! yes i just picked abk because I knew it would work, but now looking at it bk is all that is required! i see! – Andrew Carratu Aug 10 '22 at 03:04
1

This is essentially never true: take $p$ a prime factor of $b$. Then $a$ is prime to $p$, hence there are infinitely many $n$ so that $an=-1$ mod $p$; this implies that $an+1$ and $bn$ are both divisible by $p$. On the other hand, if $b=1$ then it is true that $an+1$ and $n$ are coprime for all $n$ no matter what $a$ is.

(This answered the first version of the question---whether or not $an+1$ and $bn$ were coprime for sufficiently large $n$; after this answer was posted the OP then edited to ask a different question.)

Stephen
  • 14,811
  • 1
    The first part shows there are infinitely many $n$ for which the gcd is not $1$. Why does that mean there aren't infinitely many $n$ for which it is $1$? – Arturo Magidin Aug 10 '22 at 02:56
  • Oh, I see the question has changed. You might want to make. note in your answer, lest it be downvoted. (Original question just asked they be coprime, with an implied "for all $n$"). – Arturo Magidin Aug 10 '22 at 02:58
  • 1
    @ArturoMagidin This has happened to me several times on the site (I answer a question, the asker feels unnecessarily embarrassed and changes it, my answer to the old question gets downvoted, I delete it). Normally I don't answer questions I think are "easy" for this reason. I don't know why I bothered here... – Stephen Aug 10 '22 at 13:18
  • @ArturoMagidin As noted in my answer, the "for all $n$" was not the original question, but rather "for sufficiently large $n$". – Stephen Aug 10 '22 at 15:26