Summer is a great time to explore cool problems to keep your skills sharp!  Schedule a class today!

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
Another NT FE
nukelauncher   63
N a minute ago by sansgankrsngupta
Source: ISL 2019 N4
Find all functions $f:\mathbb Z_{>0}\to \mathbb Z_{>0}$ such that $a+f(b)$ divides $a^2+bf(a)$ for all positive integers $a$ and $b$ with $a+b>2019$.
63 replies
nukelauncher
Sep 22, 2020
sansgankrsngupta
a minute ago
strange geometry problem
Zavyk09   1
N 7 minutes ago by Captainscrubz
Source: own
Let $ABC$ be a triangle with circumcenter $O$ and internal bisector $AD$. Let $AD$ cuts $(O)$ again at $M$ and $MO$ cuts $(O)$ again at $N$. Point $L$ lie on $AD$ such that $(AD, LM) = -1$. The line pass through $L$ and perpendicular to $AD$ intersects $NC, NB$ at $P, Q$ respectively. Let circumcircle of $\triangle NPQ$ cuts $(O)$ at $G \ne N$. Prove that $\angle AGD = 90^{\circ}$.
1 reply
Zavyk09
Yesterday at 4:32 PM
Captainscrubz
7 minutes ago
n^6 + 5n^3 + 4n + 116 is the product of two or more consecutive numbers
Amir Hossein   2
N 23 minutes ago by KTYC
Source: Bulgaria JBMO TST 2018, Day 1, Problem 3
Find all positive integers $n$ such that the number
$$n^6 + 5n^3 + 4n + 116$$is the product of two or more consecutive numbers.
2 replies
Amir Hossein
Jun 25, 2018
KTYC
23 minutes ago
IMO Shortlist 2009 - Problem G3
April   49
N an hour ago by Ilikeminecraft
Let $ABC$ be a triangle. The incircle of $ABC$ touches the sides $AB$ and $AC$ at the points $Z$ and $Y$, respectively. Let $G$ be the point where the lines $BY$ and $CZ$ meet, and let $R$ and $S$ be points such that the two quadrilaterals $BCYR$ and $BCSZ$ are parallelogram.
Prove that $GR=GS$.

Proposed by Hossein Karke Abadi, Iran
49 replies
April
Jul 5, 2010
Ilikeminecraft
an hour ago
No more topics!
gcd (a^n+b,b^n+a) is constant
EthanWYX2009   82
N May 21, 2025 by iyappana
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
82 replies
EthanWYX2009
Jul 16, 2024
iyappana
May 21, 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.
EthanWYX2009
872 posts
#1 • 17 Y
Y by MathIQ., aaaa_27, NO_SQUARES, GeoKing, VIATON, aidan0626, kamatadu, Sedro, Rounak_iitr, sevket12, Eka01, eduD_looC, farhad.fritl, MS_asdfgzxcvb, cubres, Ibrahim_K, Jackson0423
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
This post has been edited 5 times. Last edited by EthanWYX2009, Jul 19, 2024, 5:26 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
hotmonkey1
2192 posts
#2 • 1 Y
Y by cubres
spoilered question
This post has been edited 1 time. Last edited by hotmonkey1, Jul 16, 2024, 1:23 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IndoMathXdZ
694 posts
#3 • 89 Y
Y by ATGY, hotmonkey1, CT17, ChubbyTomato426, lucas3617, aaaa_27, Assassino9931, kingu, CyclicISLscelesTrapezoid, Aryan-23, Sylvestra, BlazingMuddy, InternetPerson10, math90, Davi Medeiros, GuvercinciHoca, Quidditch, Jalil_Huseynov, bin_sherlo, Supertinito, math_comb01, navi_09220114, Funcshun840, Stuffybear, nmoon_nya, ehuseyinyigit, GeoMetrix, Seicchi28, trk08, hamon, thdnder, GeoKing, Mathological03, Sedro, eg4334, Mogmog8, lpieleanu, szpolska, ihatemath123, GorgonMathDota, aidan0626, EpicBird08, NO_SQUARES, talkon, timon92, OronSH, khina, justJen, mathfan2020, MathisWow, centslordm, megarnie, tricky.math.spider.gold.1, ohiorizzler1434, iamnotgentle, MS_Kekas, crocodilepradita, gghx, kamatadu, Filipjack, Capryon, pepat, avisioner, bachkieu, Supercali, MathIQ., RobertRogo, WinterSecret, TheMathCruncher_007, RevolveWithMe101, sarjinius, eduD_looC, erringbubble, MAKEANALITGREATAGAIN2018, khan.academy, Kingsbane2139, oVlad, MathPassionForever, Nartku, Kosiu, somebodyyouusedtoknow, farhad.fritl, GreenTea2593, DensSv, MS_asdfgzxcvb, cubres, giangtruong13, DroneChaudhary, cosinesine
Feels surreal to say that this is the first Indonesia problem on IMO, proposed by yours truly (Valentio Iverson from Indonesia). Pleasantly surprised that it appears as P2! Hope people enjoy this problem as much as I do.

Remark about problem difficulty (spoilers)
Remark about problem creation
This post has been edited 3 times. Last edited by IndoMathXdZ, Jul 16, 2024, 6:27 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Physicsknight
640 posts
#4 • 2 Y
Y by ehuseyinyigit, cubres
$\text{Very nice problem Valentino}$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathhotspot
70 posts
#6 • 2 Y
Y by ehuseyinyigit, cubres
Good advanced diophantine practice!
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
thdnder
198 posts
#7 • 9 Y
Y by BlazingMuddy, Funcshun840, Iveela, crocodilepradita, kamatadu, AlexCenteno2007, MathIQ., Bazo1, cubres
I claim that the only such pair is $(a, b) = (1, 1)$. Indeed, $(a, b) = (1, 1)$ satisfies the problem condition.

Claim: $ab + 1$ is a power of 2.

Proof. Suppose the exists a prime divisor $2 < p$ that divides $ab + 1$. Then, taking $n \equiv p-2 (p-1)$ and $n > N$, we see that $p \mid a^n + b$ and $p \mid b^n + a$. Therefore, $p \mid g$. Now, taking $n \equiv 0 (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$, a contradiction. $\square$

Now suppose $ab + 1 = 2^k$ for some $k \ge 1$. Taking $\nu_2(n)$ large enough and $n > N$, we see that $\nu_2(a^n - 1) > \nu_2(b + 1)$, so $\nu_2(a^n + b) = \nu_2(a^n - 1 + b + 1) = \nu_2(b + 1)$. Similarly, $\nu_2(b^n + a) = \nu_2(a + 1)$. Hence, $\nu_2(g) = \min(\nu_2(a + 1), \nu_2(b + 1))$.

Take a positive integer $n$ such that $\nu_2(n + 1)$ large and $n > N$, we see that $\nu_2(a^{n+1} - 1) > k$. Let $M = \nu_2(a^{n + 1} - 1)$, then $a^n + b \equiv \frac{1}{a} + b \equiv \frac{ab + 1}{a} (2^M)$, so $\nu_2(a^n + b) = k$. Analogously, $\nu_2(b^n + a) = k$. This implies $\nu_2(g) = k$. However, $\nu_2(g) = \min(\nu_2(a + 1), \nu_2(b + 1))$, this forces to $k = 1$, as wanted. $\blacksquare$
This post has been edited 2 times. Last edited by thdnder, Jul 16, 2024, 2:01 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bsf714
62 posts
#8 • 4 Y
Y by JanHaj, VicKmath7, Haris1, cubres
First note that if $a=b$, we have $(a^n + a, a^n + a) = a^n + a$ which is eventually constant if and only if $a=1$. We may now assume that $a<b$ due to symmetry.

Let $d = (a, b)$ with $a = dx$, $b = dy$ and $(x, y) = 1$. We have $$G_n := (a^n + b, b^n + a) = d(d^{n-1}x^n + y, d^{n-1}y^n + x).$$Further, we have $$\frac{G_n}{d} = (d^{n-1}x^n 
+ y, d^{n-1}y^n + x) = (d^{n-1}x^n 
+ y, x^{n+1} - y^{n+1})$$since $$y^n(d^{n-1}x^n + y) - x^n(d^{n-1}y^n + x) = y^{n+1} - x^{n+1},$$noting that the coefficients $x^n$ and $y^n$ are coprime to $G_n/d$ (indeed, if $p$ is a prime dividing both $x$ and $G_n/d$, then $p\mid d^{n-1}x^n + y$ implies that $p\mid y$, but $x$ and $y$ are coprime; similarly if $p$ is a prime dividing both $y$ and $G_n/d$).

Now, let $q$ be a positive integer parameter, assumed to be coprime to $x, y$ and $d$, as well as such that $q\nmid x-y$. We would like to force $q\mid d^{n-1}x^n + y$ and $q\mid x^{n+1} - y^{n+1}$ for infinitely many $n$, as well as $q\nmid x^{n+1} - y^{n+1}$ for infinitely many $n$. The latter relation gives $(x/y)^{n+1}\equiv 1\pmod q$ and we can force this to happen by choosing $n+1 = k\phi(q)$ for any positive integer $k$, and force it not to happen by choosing $n+1 = k\phi(q) + 1$, since $q\nmid x-y$. It remains to show that such a positive integer $q$ can be chosen with the additional property that $q\mid d^{n-1}x^n + y$ when $n+1 = k\phi(q)$. We need $$d^{k\phi(q)-2}x^{k\phi(q)-1} + y \equiv 0 \pmod q \iff d^{-2}x^{-1}+y\equiv 0\pmod q\iff q\mid d^2xy + 1.$$Note that such $q$ is automatically coprime to $x, y$ and $d$. To ensure that $q\nmid x-y$, we can take $q=d^2xy + 1$. Indeed, if $x\equiv y\pmod q$, we have $d^2xy + 1\mid x-y$, but $y>x$ by the first paragraph and obviously $d^2xy + 1 > y > y - x$.

This finishes the solution, for we have shown that $dq\mid G_n$ for infinitely many $n$ as well as $dq\nmid G_n$ for infinitely many $n$, thus $G_n$ cannot be eventually constant.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Tintarn
9045 posts
#9 • 21 Y
Y by thdnder, BlazingMuddy, CBMaster, Assassino9931, KST2003, Sedro, Fardad, CahitArf, crocodilepradita, pingupignu, adityaguharoy, sami1618, mastermind.hk16, Begli_I., tag-, Pratik12, MS_asdfgzxcvb, cubres, IndoMathXdZ, X.Luser, Kingsbane2139
Let $q=ab+1$. Then $q \mid a^n+b,b^n+a$ whenever $n \equiv -1 \pmod{\varphi(q)}$, hence $q \mid g$, but then $q \mid a^{n+1}-a^n$ for large $n$ and hence $q \mid a-1$ (since $q$ is clearly coprime to $a$), thus $a=1$ and similarly $b=1$, hence $a=b=1$, which indeed works.
This post has been edited 2 times. Last edited by Tintarn, Jul 23, 2024, 1:15 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
BlazingMuddy
282 posts
#10 • 5 Y
Y by abdirasulov, Nartku, ngduchieu1903, Pratik12, cubres
The proposer noted that the main idea is looking at what $ab + 1$ does. Here is another solution, inspired by @above's first step.

Edit: I forgot something. The problem has a funny backstory; I'll let the proposer post it if he's willing to :)

First note that $ab + 1$ is coprime with $a$ and $b$. Picking $n$ big enough with $n \equiv -1 \pmod{\phi(ab + 1)}$ gives $ab + 1 \mid a^n + b$ and $ab + 1 \mid b^n + a$, so $ab + 1 \mid g$. In particular, picking $n$ big enough with $n \equiv 1 \pmod{\phi(ab + 1)}$ gives $ab + 1 \mid a + b$. This forces either $a = 1$ or $b = 1$.

Finally, WLOG $b = 1$. Then $\gcd(a^n + 1, a + 1)$ is eventually constant. For $n$ odd, it is equal to $a + 1$, so $a + 1 \mid a^n + 1$ for all $n$ big enough. Picking $n$ even gives $a + 1 \mid 2 \implies a = 1$, and thus $g = 2$.


Indonesia has made another history! Congratulations to IndoMathXdZ!
This post has been edited 1 time. Last edited by BlazingMuddy, Jul 16, 2024, 3:09 PM
Reason: Add backstory
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math_comb01
662 posts
#11 • 1 Y
Y by cubres
Cute!
Notice that substituting $n=\varphi(ab+1)t-1$ yields that $ab+1 \mid g$ then $ab+1 \mid a^n+b$ now take $n \equiv 1 (\mod \varphi(ab+1))$ to get either $a=1$ or $b=1$, WLOG $b=1$ then $gcd(a^n+1,a+1)$ is constant for $n \geq N$ for odd $n$ it is $a+1$ while for even it divides $2$, so $a=1$, therefore $a=b=1$ is the only solution.
EDIT: sniped by @above
This post has been edited 1 time. Last edited by math_comb01, Jul 16, 2024, 2:44 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Funcshun840
38 posts
#12 • 1 Y
Y by cubres
What is the MOHS of this problem?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
vsamc
3789 posts
#13 • 4 Y
Y by centslordm, KevinYang2.71, persamaankuadrat, cubres
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
EeEeRUT
83 posts
#14 • 1 Y
Y by cubres
Let $\gcd(a,b) = k, a= pk$ and $b=qk$, where $p$ and $q$ are coprime.

So, we get that $$\gcd(k^{n-1}p^{n+1} + pq, k^{n-1}q^{n+1} + pq) = g_1$$$$\gcd(p^{n+1}-q^{n+1},k^{n-1}q^{n+1} + pq) = g_2$$for some $g_1,g_2 \in \mathbb{N}$

Note that $g_2$ is fixed, thus there exist prime $t$ such that $t \mid g_2$

Consider $p^{n+1} \equiv q^{n+1} \pmod{t}$ $$p^{n+2} \equiv p^{n+1}q \equiv q^{n+1} \pmod{t}$$$$p \equiv q \pmod t$$Consider $k^{n-1}q^{n+1} + pq \equiv 0 \pmod t$

Let $M \leqslant n = \phi{(t)} \Phi + c$,we get that $$k^{c-1}q^{c+1} + pq \equiv 0 \pmod t$$Take $c =1$, $$q^2 + pq \equiv 0 \pmod t$$$$p + q \equiv 0 \pmod t$$thus, $p=q$, which follows $a=b$

So, $a^n + a$ has to be a fixed constant, which gives us only $a=1$.

Consequently $(a,b) = (1,1)$
This post has been edited 1 time. Last edited by EeEeRUT, Jul 16, 2024, 3:16 PM
Reason: Bracket
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shanelin-sigma
167 posts
#15 • 2 Y
Y by Funcshun840, cubres
my solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Assassino9931
1371 posts
#16 • 6 Y
Y by GeoKing, Orestis_Lignos, Maths_Girl, AlexCenteno2007, EvansGressfield, cubres
Splendid problem! What makes this problem hard is that one can write 30000 things which seem useful but then when logically realizing what one needs to prove, they get thrown in the bin. Solved with Maths_Girl and I admit that personally would probably not have solved it completely in contest conditions.

Step 1: Working with a prime p not dividing a and b is easier - what do we get? Firstly, we show that there does not exist a prime $p \geq 3$ which does not divide $a$ and $b$, but divides $a^n + b$ and $b^n + a$ for all large $n$. Suppose otherwise, then $(-1)^n a^{n^2} + a \equiv 0 \pmod p$. Take $n$ to be even, then $a^{n^2-1} \equiv -1 \pmod p$, so the order of $a$ mod $p$ divides $2n^2 - 2$ for all large $n$. In particular, it divides $2(n+2)^2 - 2 = 2n^2 + 8n + 6$, so it divides $8n+8$ for large even $n$, hence divides $8n+8$ and $8(n+2) + 8 = 8n+24$, i.e. it divides $8$. However, $2n^2-2$ is divisible by $2$, but not by $4$ for all large even $n$, so $a^2 = 1 \pmod p$. Now from $a^{n^2-1} \equiv -1 \pmod p$ for large even $n$ we get $a\equiv -1 \pmod p$. Analogously $b\equiv -1 \pmod p$, but then $n$ odd in $a^n + b$ and $b^n + a$ imply that $p$ must divide $(-1)^n - 1 = -2$, contradiction!

Step 2: If we show that there is a prime $p\geq 3$ such that $a^n + b$ and $b^n + a$ are divisible by $p$ for infinitely many $n$, then $(a,b)$ does not work, since $g$ is divisible by $p$ infinitely often, but not always by Step 1. (Realized this is really needed by playing with $a=4$, $b=2$.) We look for a congruence of the form $n\equiv 
\ ? \pmod p$ where $?$ is a constant in order to apply Fermat's little theorem, for a suitable $p$ dividing an expression of $a$ and $b$. Here $? = 0,1,2$ did not seem to work, but $? = -1$ works! Indeed, $a^{-1} + b$ and $b^{-1} + a$ are divisible by $p$ if and only if $ab+1$ is (and note that if $p$ divides $ab+1$, then $p$ does not divide $a$ and $b$). So if $ab+1$ has a prime divisor $p\geq 3$, then we have obtained a contradiction.

Step 3: Take care of $ab+1$ being 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.

EDIT: Reminded now that the trick with $n\equiv -1 \pmod p$ famously appears in ELMO SL 2014 N7 (and to some rather unrelated extent, in IMO 2005/4).
This post has been edited 6 times. Last edited by Assassino9931, Jul 16, 2024, 3:56 PM
Z K Y
G
H
=
a