Stay ahead of learning milestones! Enroll in a class over the summer!

G
Topic
First Poster
Last Poster
k a May Highlights and 2025 AoPS Online Class Information
jlacosta   0
May 1, 2025
May is an exciting month! National MATHCOUNTS is the second week of May in Washington D.C. and our Founder, Richard Rusczyk will be presenting a seminar, Preparing Strong Math Students for College and Careers, on May 11th.

Are you interested in working towards MATHCOUNTS and don’t know where to start? We have you covered! If you have taken Prealgebra, then you are ready for MATHCOUNTS/AMC 8 Basics. Already aiming for State or National MATHCOUNTS and harder AMC 8 problems? Then our MATHCOUNTS/AMC 8 Advanced course is for you.

Summer camps are starting next month at the Virtual Campus in math and language arts that are 2 - to 4 - weeks in duration. Spaces are still available - don’t miss your chance to have an enriching summer experience. There are middle and high school competition math camps as well as Math Beasts camps that review key topics coupled with fun explorations covering areas such as graph theory (Math Beasts Camp 6), cryptography (Math Beasts Camp 7-8), and topology (Math Beasts Camp 8-9)!

Be sure to mark your calendars for the following upcoming events:
[list][*]May 9th, 4:30pm PT/7:30pm ET, Casework 2: Overwhelming Evidence — A Text Adventure, a game where participants will work together to navigate the map, solve puzzles, and win! All are welcome.
[*]May 19th, 4:30pm PT/7:30pm ET, What's Next After Beast Academy?, designed for students finishing Beast Academy and ready for Prealgebra 1.
[*]May 20th, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 1 Math Jam, Problems 1 to 4, join the Canada/USA Mathcamp staff for this exciting Math Jam, where they discuss solutions to Problems 1 to 4 of the 2025 Mathcamp Qualifying Quiz!
[*]May 21st, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 2 Math Jam, Problems 5 and 6, Canada/USA Mathcamp staff will discuss solutions to Problems 5 and 6 of the 2025 Mathcamp Qualifying Quiz![/list]
Our full course list for upcoming classes is below:
All classes run 7:30pm-8:45pm ET/4:30pm - 5:45pm PT unless otherwise noted.

Introductory: Grades 5-10

Prealgebra 1 Self-Paced

Prealgebra 1
Tuesday, May 13 - Aug 26
Thursday, May 29 - Sep 11
Sunday, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
Wednesday, Jul 16 - Oct 29

Prealgebra 2 Self-Paced

Prealgebra 2
Wednesday, May 7 - Aug 20
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Sunday, May 11 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, May 14 - Aug 27
Friday, May 30 - Sep 26
Monday, Jun 2 - Sep 22
Sunday, Jun 15 - Oct 12
Thursday, Jun 26 - Oct 9
Tuesday, Jul 15 - Oct 28

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Thursday, May 15 - Jul 31
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Wednesday, Jul 9 - Sep 24
Sunday, Jul 27 - Oct 19

Introduction to Number Theory
Friday, May 9 - Aug 1
Wednesday, May 21 - Aug 6
Monday, Jun 9 - Aug 25
Sunday, Jun 15 - Sep 14
Tuesday, Jul 15 - Sep 30

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
Sunday, May 11 - Nov 9
Tuesday, May 20 - Oct 28
Monday, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
Monday, Jul 14 - Jan 19

Paradoxes and Infinity
Mon, Tue, Wed, & Thurs, Jul 14 - Jul 16 (meets every day of the week!)

Intermediate: Grades 8-12

Intermediate Algebra
Sunday, Jun 1 - Nov 23
Tuesday, Jun 10 - Nov 18
Wednesday, Jun 25 - Dec 10
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22

Intermediate Counting & Probability
Wednesday, May 21 - Sep 17
Sunday, Jun 22 - Nov 2

Intermediate Number Theory
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
Friday, May 16 - Oct 24
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8

Advanced: Grades 9-12

Olympiad Geometry
Tuesday, Jun 10 - Aug 26

Calculus
Tuesday, May 27 - Nov 11
Wednesday, Jun 25 - Dec 17

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
Friday, May 23 - Aug 15
Monday, Jun 2 - Aug 18
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

MATHCOUNTS/AMC 8 Advanced
Sunday, May 11 - Aug 10
Tuesday, May 27 - Aug 12
Wednesday, Jun 11 - Aug 27
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Problem Series
Friday, May 9 - Aug 1
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Tuesday, Jun 17 - Sep 2
Sunday, Jun 22 - Sep 21 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Jun 23 - Sep 15
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Final Fives
Sunday, May 11 - Jun 8
Tuesday, May 27 - Jun 17
Monday, Jun 30 - Jul 21

AMC 12 Problem Series
Tuesday, May 27 - Aug 12
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Wednesday, Aug 6 - Oct 22

AMC 12 Final Fives
Sunday, May 18 - Jun 15

AIME Problem Series A
Thursday, May 22 - Jul 31

AIME Problem Series B
Sunday, Jun 22 - Sep 21

F=ma Problem Series
Wednesday, Jun 11 - Aug 27

WOOT Programs
Visit the pages linked for full schedule details for each of these programs!


MathWOOT Level 1
MathWOOT Level 2
ChemWOOT
CodeWOOT
PhysicsWOOT

Programming

Introduction to Programming with Python
Thursday, May 22 - Aug 7
Sunday, Jun 15 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Tuesday, Jun 17 - Sep 2
Monday, Jun 30 - Sep 22

Intermediate Programming with Python
Sunday, Jun 1 - Aug 24
Monday, Jun 30 - Sep 22

USACO Bronze Problem Series
Tuesday, May 13 - Jul 29
Sunday, Jun 22 - Sep 1

Physics

Introduction to Physics
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
May 1, 2025
0 replies
Simple triangle geometry [a fixed point]
darij grinberg   49
N 6 minutes ago by cj13609517288
Source: German TST 2004, IMO ShortList 2003, geometry problem 2
Three distinct points $A$, $B$, and $C$ are fixed on a line in this order. Let $\Gamma$ be a circle passing through $A$ and $C$ whose center does not lie on the line $AC$. Denote by $P$ the intersection of the tangents to $\Gamma$ at $A$ and $C$. Suppose $\Gamma$ meets the segment $PB$ at $Q$. Prove that the intersection of the bisector of $\angle AQC$ and the line $AC$ does not depend on the choice of $\Gamma$.
49 replies
darij grinberg
May 18, 2004
cj13609517288
6 minutes ago
Kosovo MO 2010 Problem 5
Com10atorics   19
N 14 minutes ago by CM1910
Source: Kosovo MO 2010 Problem 5
Let $x,y$ be positive real numbers such that $x+y=1$. Prove that
$\left(1+\frac {1}{x}\right)\left(1+\frac {1}{y}\right)\geq 9$.
19 replies
Com10atorics
Jun 7, 2021
CM1910
14 minutes ago
Hard combi
EeEApO   1
N 21 minutes ago by EeEApO
In a quiz competition, there are a total of $100 $questions, each with $4$ answer choices. A participant who answers all questions correctly will receive a gift. To ensure that at least one member of my family answers all questions correctly, how many family members need to take the quiz?

Now, suppose my spouse and I move into a new home. Every year, we have twins. Starting at the age of $16$, each of our twin children also begins to have twins every year. If this pattern continues, how many years will it take for my family to grow large enough to have the required number of members to guarantee winning the quiz gift?
1 reply
EeEApO
2 hours ago
EeEApO
21 minutes ago
Problem on symmetric polynomial
ayan_mathematics_king   5
N 23 minutes ago by bjump
If $a^3+b^3+c^3=(a+b+c)^3$, prove that $a^5+b^5+c^5=(a+b+c)^5$ where $a,b,c \in \mathbb{R}$
5 replies
ayan_mathematics_king
Jul 28, 2019
bjump
23 minutes ago
No more topics!
gcd (a^n+b,b^n+a) is constant
EthanWYX2009   81
N May 4, 2025 by GingerMan
Source: 2024 IMO P2
Determine all pairs $(a,b)$ of positive integers for which there exist positive integers $g$ and $N$ such that
$$\gcd (a^n+b,b^n+a)=g$$holds for all integers $n\geqslant N.$ (Note that $\gcd(x, y)$ denotes the greatest common divisor of integers $x$ and $y.$)

Proposed by Valentio Iverson, Indonesia
81 replies
EthanWYX2009
Jul 16, 2024
GingerMan
May 4, 2025
gcd (a^n+b,b^n+a) is constant
G H J
G H BBookmark kLocked kLocked NReply
Source: 2024 IMO P2
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
straight
414 posts
#76 • 1 Y
Y by cubres
Assassino9931 wrote:
Did anyone mention that this problem appeared in the IMSC China International camp 2024 and benefitted some students??? :)

(P.S. I am not blaming anyone that a setup has been made; in fact I can assure that no such thing has happened, I am just giving a fun fact here.)

@above I also realized this and I think it's very unfair indeed. It is completely the same idea with completely the same construction. If I recall proposer of that problem was Navid Safaei (forgive me if I'm wrong) . So far I haven't heard of anyone claiming to have known this problem before the IMO though
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Assassino9931
1324 posts
#77 • 1 Y
Y by cubres
straight wrote:
Assassino9931 wrote:
Did anyone mention that this problem appeared in the IMSC China International camp 2024 and benefitted some students??? :)

(P.S. I am not blaming anyone that a setup has been made; in fact I can assure that no such thing has happened, I am just giving a fun fact here.)

@above I also realized this and I think it's very unfair indeed. It is completely the same idea with completely the same construction. If I recall proposer of that problem was Navid Safaei (forgive me if I'm wrong) . So far I haven't heard of anyone claiming to have known this problem before the IMO though

No, the origin of the problem I put is Ukraine 2019 8.8/9.7 by Arsenii Nikolaiev (who was actually Observer B at IMO 2024 if I am not mistaken, so in particular not part of the leaders/observer A problem voting). And, well, I did hear about at least one student benefitting from that, but prefer keep the identity of the country confidential.
This post has been edited 1 time. Last edited by Assassino9931, Mar 31, 2025, 10:53 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Cali.Math
128 posts
#78 • 1 Y
Y by cubres
We uploaded our solution https://calimath.org/pdf/IMO2024-2.pdf on youtube https://youtu.be/daboPS8Dtyk.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Assassino9931
1324 posts
#79 • 3 Y
Y by pavel kozlov, VicKmath7, cubres
Here is the (primitive root)-styled solution, in spirit of what VicKmath7 wrote above.

Let $p \geq 3$ be a prime. Consider firstly the following: when is there an integer $n$ such that $a^n + b \equiv 0 \pmod p$? If $g$ is a primitive root mod $p$ (where $p$ is a prime not dividing $a$ or $b$!), then writing $a \equiv g^A$, $b \equiv g^B$ transfers to the equivalent $g^{B}(g^{nA-B}+1) \equiv 0 \pmod p$, i.e. $nA - B \equiv \frac{p-1}{2} \pmod {p-1}$. Similarly, for $b^n+a$ to be divisible by $p$ we must have $nB - A \equiv \frac{p-1}{2} \pmod {p-1}$. Now if it is the case that $A+B\equiv \frac{p-1}{2} \pmod {p-1}$, then taking $n\equiv -1 \pmod {p-1}$ would work not only for $a^n+b$, but also for $b^n + a$.

But note that $A + B \equiv \frac{p-1}{2} \pmod {p-1}$ if and only if $g^{A+B} \equiv -1 \pmod p$, i.e. $p$ divides $ab+1$. Therefore if we initially take $p$ to be an odd prime divisor of $ab+1$ (note that such does not divide $a$ or $b$), then there are infinitely many $n$, for which the required greatest common divisor is divisible by $p$. However, it cannot be the case that $p$ divides $a^n+b$ and $b^n+a$ for all large $n$ -- otherwise, $p$ would divide $a^{n+1} + ab \equiv a^{n+1} - 1$, so $p$ would divide $a-1$ (due to $a^{n+1} \equiv a^{n+2} \equiv 1 \pmod p$ and $\gcd(a,ab+1) = 1$), similarly $p$ would divide $b-1$, but now $ab+1 \equiv 0 \pmod p$ implies that $p$ must also divide $a+1$ and hence $(a+1) - (a-1) = 2$, contradicting $p\geq 3$.

Therefore, if $a$ and $b$ are such that $ab+1$ has an odd prime divisor, then they cannot satisfy the problem conditions. Finally, suppose $ab+1$ is a power of $2$. Fortunately, we only need that $ab+1$ is divisible by $4$ (unless $a=b=1$, which satisfies the problem conditions). Indeed, we may assume $a\equiv 3 \pmod 4$ and $b \equiv 1 \pmod 4$ and now if $n$ is even, then $a^n + b$ is divisible by $2$, but not by $4$ (and $b^n + a$ is divisible by $4$), while if $n$ is odd, then both $a^n + b$ and $b^n + a$ are divisible by $4$, so $\gcd(a^n+b,b^n+a)$ is infinitely often divisible by $4$ and not divisible by $4$, contradiction.
This post has been edited 3 times. Last edited by Assassino9931, Sep 18, 2024, 8:22 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
L13832
268 posts
#80 • 2 Y
Y by radian_51, cubres
What an amazing problem, kudos to the problem proposer :)
$\textbf{Answer:}$ $a=b=1$
Let $p$ be a prime such that $p\mid g$, so $p\mid b^{n-1}(a^n+b)-b^n-a\implies p\mid ab-1$ if $p\nmid a$.
Finally checking if $ab+1\mid g$ and choosing $n\equiv -1\pmod{\phi(ab+1)}$(this is possible because $\gcd(ab+1,a)=\gcd(b,ab+1)=1$) we have
$$a^n+b\equiv a^{-1}+b\equiv \frac{ab+1}{a}\equiv 0\pmod{ab+1}$$$$b^n+1\equiv a+b^{-1}\equiv \frac{ab+1}{b}\equiv 0\pmod{ab+1}$$Motivation
The last part comes from the fact that $a,b$ can be inverted modulo ${ab+1}$. Similarly we obtain $b^n+a\equiv 0\pmod{ab+1}$ which gives us $ab+1\mid g\implies p\mid ab+1$
Now we take $n \equiv 0 \pmod{p-1}$, we get that $p \mid g  = \gcd(a^n + b, b^n + a)$, so by FLT, $p \mid a + 1, p \mid b + 1 \implies p \mid 2\implies p=2$.
If $ab+1=2$ then $\boxed{a=b=1}$
Otherwise $ab+1\equiv 0\pmod{4}\implies a,b\equiv \pm 1\pmod{4}$.
WLOG $a \equiv -1 \pmod{4}$ and $b \equiv 1 \pmod{4}$. If $n$ is odd then we obtain that $a^n + b$ and $b^n + a$ are both divisible by $4$, and therefore $4 \mid g$. But having $n$ even we get $a^n + b \equiv 2 \pmod{4}$ and $4 \nmid a^n + b$, a contradiction, so we are done! :yoda:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Golden_Verse
5 posts
#81 • 1 Y
Y by cubres
Answer
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Vedoral
89 posts
#82 • 1 Y
Y by cubres
Click to reveal hidden text
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AshAuktober
1005 posts
#83 • 1 Y
Y by cubres
Note that $ab+1 \mid g \mid a-b$, so indeed we must have $a  =b $, from where the only working pair is $(1, 1).
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
zaidova
87 posts
#84 • 1 Y
Y by cubres
For all n, which are positive integers ($a=b=1$) is the only solution.
This post has been edited 3 times. Last edited by zaidova, Jan 3, 2025, 7:43 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cursed_tangent1434
623 posts
#85 • 1 Y
Y by ihategeo_1969
I just can't believe I didn't manage to solve this problem in contest. The idea of considering $ab+1$ is not that random either, especially since it is almost natural to consider $a+b$ at which point you decide that the considered expression had better be symmetric but also relatively prime to both $a$ and $b$, which leads to the considered form.

The entirety of the problem is the following key claim.

Claim : For any such pair $(a,b)$ we must have $ab+1$ a power of two.

Proof : Consider a prime $p\mid ab+1$. Then, since $\gcd(ab+1,a)=\gcd(ab+1,b)=1$ it follows that $p\nmid a,b$ and so letting $n=k(p-1)-1$ for sufficiently large positive integers $k$ we have,
\[a^n+b \equiv \frac{1}{a}+b \equiv \frac{ab+1}{a} \equiv 0 \pmod{p}\]and
\[a+b^n \equiv a+\frac{1}{b} \equiv \frac{ab+1}{b} \equiv 0 \pmod{p}\]which implies that $p \mid \gcd(a^n+b,b^n+a)$. But then, if the $\gcd$ is eventually constant, we have that $p \mid \gcd(a^n+b,b^n+a)$ for all sufficiently large positive integers $n$. But then, considering $n=k(p-1)$ for sufficiently large positive integers $k$ we have that,
\[0 \equiv a^n+b \equiv b+1 \pmod{p}\]And similarly, $a+1 \equiv 0 \pmod{p}$. But then, since $p\mid ab+1$ and $p \mid a+1$ it follows that $p \mid b-1$ which in conjunction with $p\mid b+2$ implies that $p=2$. This means that there cannot exist any odd prime $p$ dividing $ab+1$ proving the claim.

Now, if $ab+1>2$ and
\[ab+1=2^r\]for some $r \ge 2$, it follows that $ab \equiv 3 \pmod{4}$. Thus, $a\equiv 1 \pmod{4}$ and $b \equiv 3 \pmod{4}$ (or vice versa). But note that this means for even $n$,
\[a^n + b \equiv 1+3 \equiv 0 \pmod{4}\]but
\[a+b^n \equiv 1+1 \equiv 2 \pmod{4} \]Thus, $\nu_2(\gcd(a^n+b,b^n+a))=1$. But note that for odd $n$ we have,
\[a^n+b \equiv 1 + 3 \equiv 0 \pmod{4}\]and
\[a+b^n \equiv 1 + 3 \equiv 0 \pmod{4}\]which implies that $4\mid \gcd(a^n+b,b^n+a)$. But, if the $\gcd$ is eventually constant this is a clear contradiction, which implies that we must have $ab+1=2$ and thus, $a=b=1$ as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
quantam13
112 posts
#86
Y by
Cute solution. The main idea is to consider the sequence modulo $ab+1$, which can be motivated by "$n=-1$".
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
dstanz5
243 posts
#89
Y by
quantam13 wrote:
Cute solution. The main idea is to consider the sequence modulo $ab+1$, which can be motivated by "$n=-1$".

Sorry for necroposting, I am going through the recent problems and I wish to know more about why $ab+1$ is the key expression here. "$n = -1$" would give $gcd(\frac{1}{a} + b, \frac{1}{b} + a)$ but I don't know what this gives.
EDIT: Oh I see, if you multiply them by a and b respectively they both give $ab+1$. Thanks to khina and vEnhance
This post has been edited 1 time. Last edited by dstanz5, Mar 31, 2025, 7:51 AM
Reason: :(
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ilikeminecraft
619 posts
#90
Y by
I claim that $(a, b) = (1, 1)$ is the only valid answer.

We take $((a^c + b, b^c + a), (a^{c + 1} + b, b^{c + 1} + a))$ first. Note that $((a, b), (c, d)) = ((a, c), (b, d)).$ Thus,
\begin{align*}
  ((a^c + b, b^c + a), (a^{c + 1} + b, b^{c + 1} + a)) & = ((a^c + b, a^{c + 1} + b), (b^c + a, b^{c + 1} + a)) \\
  (a^c + b, a^{c + 1} + b) & = (a^c + b, a^{c + 1} - a^c) \\
  & = (a^c + b, a - 1)(a^c + b, a^c) \text{ since } (a^c, a - 1) = 1\\
  & = (a^{c - 1} + b, a - 1)(b, a^c) \\
  & = (b + 1, a - 1)(b, a^c) \\
  ((a^c + b, b^c + a), (a^{c + 1} + b, b^{c + 1} + a)) & = ((b + 1, a - 1)(b, a^c), (b - 1, a + 1)(a, b^c)) \\
  & \mid ((b + 1, a-1),(b - 1, a + 1)(a, b^c))((b, a^c),(b - 1, a + 1)(a, b^c)) \\
  & \mid ((b + 1, a-1),(b - 1, a + 1))((b, a^c), (a, b^c)) \\
  & = 2(a, b)
\end{align*}Thus, we have that $(a^n + b, b^n + a) \mid 2(a, b)$ when it becomes constant. Now, let $q = ab + 1.$ By picking an $n \equiv-1\pmod {\phi(q)},$ we have that $q\mid a + \frac1b, b + \frac1a \implies q\mid(a^n + b, b^n + a) \implies q \mid 2(a, b).$ However, we have that $q = ab + 1\implies (q, a) = (q, b) = 1.$ Thus, either $q = 1,$ or 2. If $q = 1,$ then $a$ or $b$ aren't positive. Thus, $q = 2\implies \boxed{a = b = 1}.$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
santhoshn
5 posts
#91
Y by
1, 1 Answer
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
GingerMan
4 posts
#92
Y by
Answer is $(a,b)=(1,1)$ only, which works.
Take any prime divisor $p$ of $ab+1$ and let $t=\nu_p(ab+1)$. Then
\begin{align*}
  a^n+b &\equiv a^n - \frac 1a \equiv \frac{a^{n+1}-1}{a} \pmod{p^t}\\
  b^n+a &\equiv b^n - \frac 1b \equiv \frac{b^{n+1}-1}{b} \pmod{p^t}
\end{align*}So $p^t\mid \gcd(a^n+b,b^n+a)$ if and only if $\operatorname{lcm}(x,y) \mid n+1$, where $x$, $y$ are the orders of $a$, $b$ mod $p^t$, respectively. If $p^t>2$ and $(a,b)\neq (1,1)$, then $\operatorname{lcm}(x,y)>1$, so the sequence is not eventually constant.
Thus $p^t=2$, implying $ab+1=2$, which still gives $(a,b)=(1,1)$.
Z K Y
N Quick Reply
G
H
=
a