We have your learning goals covered with Spring and Summer courses available. Enroll today!

G
Topic
First Poster
Last Poster
k a March Highlights and 2025 AoPS Online Class Information
jlacosta   0
Mar 2, 2025
March is the month for State MATHCOUNTS competitions! Kudos to everyone who participated in their local chapter competitions and best of luck to all going to State! Join us on March 11th for a Math Jam devoted to our favorite Chapter competition problems! Are you interested in training for MATHCOUNTS? Be sure to check out our AMC 8/MATHCOUNTS Basics and Advanced courses.

Are you ready to level up with Olympiad training? Registration is open with early bird pricing available for our WOOT programs: MathWOOT (Levels 1 and 2), CodeWOOT, PhysicsWOOT, and ChemWOOT. What is WOOT? WOOT stands for Worldwide Online Olympiad Training and is a 7-month high school math Olympiad preparation and testing program that brings together many of the best students from around the world to learn Olympiad problem solving skills. Classes begin in September!

Do you have plans this summer? There are so many options to fit your schedule and goals whether attending a summer camp or taking online classes, it can be a great break from the routine of the school year. Check out our summer courses at AoPS Online, or if you want a math or language arts class that doesn’t have homework, but is an enriching summer experience, our AoPS Virtual Campus summer camps may be just the ticket! We are expanding our locations for our AoPS Academies across the country with 15 locations so far and new campuses opening in Saratoga CA, Johns Creek GA, and the Upper West Side NY. Check out this page for summer camp information.

Be sure to mark your calendars for the following events:
[list][*]March 5th (Wednesday), 4:30pm PT/7:30pm ET, HCSSiM Math Jam 2025. Amber Verser, Assistant Director of the Hampshire College Summer Studies in Mathematics, will host an information session about HCSSiM, a summer program for high school students.
[*]March 6th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar on Math Competitions from elementary through high school. Join us for an enlightening session that demystifies the world of math competitions and helps you make informed decisions about your contest journey.
[*]March 11th (Tuesday), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS Chapter Discussion MATH JAM. AoPS instructors will discuss some of their favorite problems from the MATHCOUNTS Chapter Competition. All are welcome!
[*]March 13th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar about Summer Camps at the Virtual Campus. Transform your summer into an unforgettable learning adventure! From elementary through high school, we offer dynamic summer camps featuring topics in mathematics, language arts, and competition preparation - all designed to fit your schedule and ignite your passion for learning.[/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
Sunday, Mar 2 - Jun 22
Friday, Mar 28 - Jul 18
Sunday, Apr 13 - Aug 10
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
Tuesday, Mar 25 - Jul 8
Sunday, Apr 13 - Aug 10
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, Mar 23 - Jul 20
Monday, Apr 7 - Jul 28
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
Sunday, Mar 16 - Jun 8
Wednesday, Apr 16 - Jul 2
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
Monday, Mar 17 - Jun 9
Thursday, Apr 17 - Jul 3
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
Sunday, Mar 2 - Jun 22
Wednesday, Apr 16 - Jul 30
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
Tuesday, Mar 4 - Aug 12
Sunday, Mar 23 - Sep 21
Wednesday, Apr 23 - Oct 1
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

Intermediate: Grades 8-12

Intermediate Algebra
Sunday, Mar 16 - Sep 14
Tuesday, Mar 25 - Sep 2
Monday, Apr 21 - Oct 13
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
Sunday, Mar 23 - Aug 3
Wednesday, May 21 - Sep 17
Sunday, Jun 22 - Nov 2

Intermediate Number Theory
Friday, Apr 11 - Jun 27
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
Sunday, Mar 16 - Aug 24
Wednesday, Apr 9 - Sep 3
Friday, May 16 - Oct 24
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8

Advanced: Grades 9-12

Olympiad Geometry
Wednesday, Mar 5 - May 21
Tuesday, Jun 10 - Aug 26

Calculus
Sunday, Mar 30 - Oct 5
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
Sunday, Mar 23 - Jun 15
Wednesday, Apr 16 - Jul 2
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
Friday, Apr 11 - Jun 27
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
Tuesday, Mar 4 - May 20
Monday, Mar 31 - Jun 23
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

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
Monday, Mar 24 - Jun 16
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
Sunday, Mar 30 - Jun 22
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Tuesday, Mar 25 - Sep 2
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
Sat & Sun, Apr 26 - Apr 27 (4:00 - 7:00 pm ET/1:00 - 4:00pm PT)
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
Mar 2, 2025
0 replies
stuck on a system of recurrence sequence
Nonecludiangeofan   0
21 minutes ago
Please guys help me solve this nasty problem that i've been stuck for the past month:
Let \( (a_n) \) and \( (b_n) \) be two sequences defined by:
\[
a_{n+1} = \frac{1 + a_n + a_n b_n}{b_n} \quad \text{and} \quad b_{n+1} = \frac{1 + b_n + a_n b_n}{a_n}
\]for all \( n \ge 0 \), with initial values \( a_0 = 1 \) and \( b_0 = 2 \).

Prove that:
\[
a_{2024} < 5.
\]
(btw am still not comfortable with system of recurrence sequences)
0 replies
Nonecludiangeofan
21 minutes ago
0 replies
A huge group of children compare their heights
Tintarn   5
N 22 minutes ago by InCtrl
Source: All-Russian MO 2024 9.8
$1000$ children, no two of the same height, lined up. Let us call a pair of different children $(a,b)$ good if between them there is no child whose height is greater than the height of one of $a$ and $b$, but less than the height of the other. What is the greatest number of good pairs that could be formed? (Here, $(a,b)$ and $(b,a)$ are considered the same pair.)
Proposed by I. Bogdanov
5 replies
Tintarn
Apr 22, 2024
InCtrl
22 minutes ago
Iran Inequality
mathmatecS   15
N 43 minutes ago by Marcus_Zhang
Source: Iran 1998
When $x(\ge1),$ $y(\ge1),$ $z(\ge1)$ satisfy $\frac{1}{x}+\frac{1}{y}+\frac{1}{z}=2,$ prove in equality.
$$\sqrt{x+y+z}\ge\sqrt{x-1}+\sqrt{y-1}+\sqrt{z-1}$$
15 replies
mathmatecS
Jun 11, 2015
Marcus_Zhang
43 minutes ago
Inequality involving x, y and z
cefer   46
N an hour ago by Baimukh
Source: Balkan MO 2012 - Problem 2
Prove that
\[\sum_{cyc}(x+y)\sqrt{(z+x)(z+y)} \geq 4(xy+yz+zx),\]
for all positive real numbers $x,y$ and $z$.
46 replies
cefer
Apr 28, 2012
Baimukh
an hour ago
nice limits :D
Levieee   11
N Today at 4:39 PM by alexheinis
$\text{nice limit sums}$ :D :play_ball:
11 replies
Levieee
Yesterday at 10:53 PM
alexheinis
Today at 4:39 PM
real analysis
ay19bme   2
N Today at 3:57 PM by ay19bme
..............
2 replies
ay19bme
Yesterday at 8:10 PM
ay19bme
Today at 3:57 PM
Diferential ecuation from physics
QQQ43   1
N Today at 2:25 PM by QQQ43
Find all functions f:R -> R such that :
f''(x)+f'(x)*b+cos(f(x))*c=a ; where a,b,c are constants in R
f'(0)=0
f(0)=0
1 reply
QQQ43
Yesterday at 2:10 PM
QQQ43
Today at 2:25 PM
ISI 2024 P1
MrOreoJuice   7
N Today at 1:22 PM by Levieee
Find, with proof, all possible values of $t$ such that
\[\lim_{n \to \infty} \left( \frac{1 + 2^{1/3} + 3^{1/3} + \dots + n^{1/3}}{n^t} \right ) = c\]for some real $c>0$. Also find the corresponding values of $c$.
7 replies
1 viewing
MrOreoJuice
May 12, 2024
Levieee
Today at 1:22 PM
Differentiation Marathon!
LawofCosine   186
N Today at 10:01 AM by LawofCosine
Hello, everybody!

This is a differentiation marathon. It is just like an ordinary marathon, where you can post problems and provide solutions to the problem posted by the previous user. You can only post differentiation problems (not including integration and differential equations) and please don't make it too hard!

Have fun!

(Sorry about the bad english)
186 replies
LawofCosine
Feb 1, 2025
LawofCosine
Today at 10:01 AM
IMC 1994 D2 P1
j___d   12
N Today at 5:32 AM by mqoi_KOLA
Let $f\in C^1[a,b]$, $f(a)=0$ and suppose that $\lambda\in\mathbb R$, $\lambda >0$, is such that
$$|f'(x)|\leq \lambda |f(x)|$$for all $x\in [a,b]$. Is it true that $f(x)=0$ for all $x\in [a,b]$?
12 replies
j___d
Mar 6, 2017
mqoi_KOLA
Today at 5:32 AM
Solve the following Limit
deepthinka   1
N Yesterday at 10:56 PM by HacheB2031
Solve:
\lim_{ x \to \frac{\pi}{2}^+ } tan(x)

NB:The calculus textbook I'm reading gives the answer

as as ( -\infty ) and not '0.027'.

( The textbook doesn't provide any algebraic justification
for this answer, it just plots the graphs.
But i'll like a Clear algebraic explanation
)
1 reply
deepthinka
Yesterday at 9:11 PM
HacheB2031
Yesterday at 10:56 PM
why cl(W) cap X is compact confusion
enter16180   1
N Yesterday at 9:05 PM by Tip_pay
can someone say here why $ Cl(W_{x}) \cap X$ is compact?
1 reply
enter16180
Feb 19, 2023
Tip_pay
Yesterday at 9:05 PM
topology
ay19bme   3
N Yesterday at 8:09 PM by ay19bme
............
3 replies
ay19bme
Mar 18, 2025
ay19bme
Yesterday at 8:09 PM
How to Scare Beginners/Intermediate Speed Integrators
Silver08   7
N Yesterday at 6:40 PM by Silver08
Compute:

$$\int e^{x+\tan^{-1}(\sec(x)+\tan(x))}dx$$
7 replies
Silver08
Yesterday at 5:34 AM
Silver08
Yesterday at 6:40 PM
gcd (a^n+b,b^n+a) is constant
EthanWYX2009   77
N Feb 25, 2025 by quantam13
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
77 replies
EthanWYX2009
Jul 16, 2024
quantam13
Feb 25, 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.
SomeonesPenguin
123 posts
#72 • 2 Y
Y by zzSpartan, cubres
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
VicKmath7
1385 posts
#73 • 8 Y
Y by GeoKing, iamnotgentle, Assassino9931, AlexCenteno2007, oolite, ehuseyinyigit, X.Allaberdiyev, cubres
Today I tried the problem again and found another way to spot the $ab+1$ trick (which I don't see above), so I decided to post this solution along with some comments on my in-contest experience (despite not solving it there).

Solution
This post has been edited 6 times. Last edited by VicKmath7, Aug 4, 2024, 7:45 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math90
1474 posts
#74 • 1 Y
Y by cubres
Answer: $(1,1)$.

Proof that answer works: in this case
$$\gcd(a^n+b,b^n+a)=2$$for all $n\in\mathbb N$, so $(1,1)$ works.

Now we prove that $(a,b)=(1,1)$. Observe that $\gcd(a,ab+1)=\gcd(b,ab+1)=1$. By choosing $n=\varphi(ab+1)N-1$ and using Euler's theorem, we have

$$a^n+b\equiv a^{-1}+b\equiv 0\pmod{ab+1}.$$so $ab+1\mid a^n+b$. Similarly $ab+1\mid b^n+a$ so
$$ab+1\mid \gcd(a^n+b,b^n+a)=g.$$As a result we have $ab+1\mid a^n+b$ for all $n\ge N$, so $\{a^n\}$ is eventually constant modulo $ab+1$. As $\gcd(a,ab+1)=1$, this implies that
$$a\equiv 1\pmod{ab+1}.$$If $a\ne 1$, then $ab+1\le a-1$, which is impossible. Hence $a=1$. Similarly $b=1$ so $(a,b)=(1,1)$.
This post has been edited 1 time. Last edited by math90, Aug 21, 2024, 8:19 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Assassino9931
1197 posts
#75 • 1 Y
Y by cubres
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.)
This post has been edited 3 times. Last edited by Assassino9931, Sep 11, 2024, 5:13 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
straight
406 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
1197 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 Nikolaev (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.
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
1197 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
249 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
927 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
83 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
549 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
96 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
N Quick Reply
G
H
=
a