Plan ahead for the next school year. Schedule your class today!

G
Topic
First Poster
Last Poster
k a July Highlights and 2025 AoPS Online Class Information
jwelsh   0
Jul 1, 2025
We are halfway through summer, so be sure to carve out some time to keep your skills sharp and explore challenging topics at AoPS Online and our AoPS Academies (including the Virtual Campus)!

[list][*]Over 60 summer classes are starting at the Virtual Campus on July 7th - check out the math and language arts options for middle through high school levels.
[*]At AoPS Online, we have accelerated sections where you can complete a course in half the time by meeting twice/week instead of once/week, starting on July 8th:
[list][*]MATHCOUNTS/AMC 8 Basics
[*]MATHCOUNTS/AMC 8 Advanced
[*]AMC Problem Series[/list]
[*]Plus, AoPS Online has a special seminar July 14 - 17 that is outside the standard fare: Paradoxes and Infinity
[*]We are expanding our in-person AoPS Academy locations - are you looking for a strong community of problem solvers, exemplary instruction, and math and language arts options? Look to see if we have a location near you and enroll in summer camps or academic year classes today! New locations include campuses in California, Georgia, New York, Illinois, and Oregon and more coming soon![/list]

MOP (Math Olympiad Summer Program) just ended and the IMO (International Mathematical Olympiad) is right around the corner! This year’s IMO will be held in Australia, July 10th - 20th. Congratulations to all the MOP students for reaching this incredible level and best of luck to all selected to represent their countries at this year’s IMO! Did you know that, in the last 10 years, 59 USA International Math Olympiad team members have medaled and have taken over 360 AoPS Online courses. Take advantage of our Worldwide Online Olympiad Training (WOOT) courses
and train with the best! Please note that early bird pricing ends August 19th!
Are you tired of the heat and thinking about Fall? You can plan your Fall schedule now with classes at either AoPS Online, AoPS Academy Virtual Campus, or one of our AoPS Academies around the US.

Our full course list for upcoming classes is below:
All classes start 7:30pm ET/4:30pm PT unless otherwise noted.

Introductory: Grades 5-10

Prealgebra 1 Self-Paced

Prealgebra 1
Wednesday, Jul 16 - Oct 29
Sunday, Aug 17 - Dec 14
Tuesday, Aug 26 - Dec 16
Friday, Sep 5 - Jan 16
Monday, Sep 8 - Jan 12
Tuesday, Sep 16 - Jan 20 (4:30 - 5:45 pm ET/1:30 - 2:45 pm PT)
Sunday, Sep 21 - Jan 25
Thursday, Sep 25 - Jan 29
Wednesday, Oct 22 - Feb 25
Tuesday, Nov 4 - Mar 10
Friday, Dec 12 - Apr 10

Prealgebra 2 Self-Paced

Prealgebra 2
Friday, Jul 25 - Nov 21
Sunday, Aug 17 - Dec 14
Tuesday, Sep 9 - Jan 13
Thursday, Sep 25 - Jan 29
Sunday, Oct 19 - Feb 22
Monday, Oct 27 - Mar 2
Wednesday, Nov 12 - Mar 18

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Tuesday, Jul 15 - Oct 28
Sunday, Aug 17 - Dec 14
Wednesday, Aug 27 - Dec 17
Friday, Sep 5 - Jan 16
Thursday, Sep 11 - Jan 15
Sunday, Sep 28 - Feb 1
Monday, Oct 6 - Feb 9
Tuesday, Oct 21 - Feb 24
Sunday, Nov 9 - Mar 15
Friday, Dec 5 - Apr 3

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Wednesday, Jul 2 - Sep 17
Sunday, Jul 27 - Oct 19
Monday, Aug 11 - Nov 3
Wednesday, Sep 3 - Nov 19
Sunday, Sep 21 - Dec 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Friday, Oct 3 - Jan 16
Sunday, Oct 19 - Jan 25
Tuesday, Nov 4 - Feb 10
Sunday, Dec 7 - Mar 8

Introduction to Number Theory
Tuesday, Jul 15 - Sep 30
Wednesday, Aug 13 - Oct 29
Friday, Sep 12 - Dec 12
Sunday, Oct 26 - Feb 1
Monday, Dec 1 - Mar 2

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Friday, Jul 18 - Nov 14
Thursday, Aug 7 - Nov 20
Monday, Aug 18 - Dec 15
Sunday, Sep 7 - Jan 11
Thursday, Sep 11 - Jan 15
Wednesday, Sep 24 - Jan 28
Sunday, Oct 26 - Mar 1
Tuesday, Nov 4 - Mar 10
Monday, Dec 1 - Mar 30

Introduction to Geometry
Monday, Jul 14 - Jan 19
Wednesday, Aug 13 - Feb 11
Tuesday, Aug 26 - Feb 24
Sunday, Sep 7 - Mar 8
Thursday, Sep 11 - Mar 12
Wednesday, Sep 24 - Mar 25
Sunday, Oct 26 - Apr 26
Monday, Nov 3 - May 4
Friday, Dec 5 - May 29

Paradoxes and Infinity
Mon, Tue, Wed, & Thurs, Jul 14 - Jul 16 (meets every day of the week!)
Sat & Sun, Sep 13 - Sep 14 (1:00 - 4:00 PM PT/4:00 - 7:00 PM ET)

Intermediate: Grades 8-12

Intermediate Algebra
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22
Friday, Aug 8 - Feb 20
Tuesday, Aug 26 - Feb 24
Sunday, Sep 28 - Mar 29
Wednesday, Oct 8 - Mar 8
Sunday, Nov 16 - May 17
Thursday, Dec 11 - Jun 4

Intermediate Counting & Probability
Sunday, Sep 28 - Feb 15
Tuesday, Nov 4 - Mar 24

Intermediate Number Theory
Wednesday, Sep 24 - Dec 17

Precalculus
Wednesday, Aug 6 - Jan 21
Tuesday, Sep 9 - Feb 24
Sunday, Sep 21 - Mar 8
Monday, Oct 20 - Apr 6
Sunday, Dec 14 - May 31

Advanced: Grades 9-12

Calculus
Sunday, Sep 7 - Mar 15
Wednesday, Sep 24 - Apr 1
Friday, Nov 14 - May 22

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)
Sunday, Aug 17 - Nov 9
Wednesday, Sep 3 - Nov 19
Tuesday, Sep 16 - Dec 9
Sunday, Sep 21 - Dec 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Oct 6 - Jan 12
Thursday, Oct 16 - Jan 22
Tues, Thurs & Sun, Dec 9 - Jan 18 (meets three times a week!)

MATHCOUNTS/AMC 8 Advanced
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)
Sunday, Aug 17 - Nov 9
Tuesday, Aug 26 - Nov 11
Thursday, Sep 4 - Nov 20
Friday, Sep 12 - Dec 12
Monday, Sep 15 - Dec 8
Sunday, Oct 5 - Jan 11
Tues, Thurs & Sun, Dec 2 - Jan 11 (meets three times a week!)
Mon, Wed & Fri, Dec 8 - Jan 16 (meets three times a week!)

AMC 10 Problem Series
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)
Sunday, Aug 10 - Nov 2
Thursday, Aug 14 - Oct 30
Tuesday, Aug 19 - Nov 4
Mon & Wed, Sep 15 - Oct 22 (meets twice a week!)
Mon, Wed & Fri, Oct 6 - Nov 3 (meets three times a week!)
Tue, Thurs & Sun, Oct 7 - Nov 2 (meets three times a week!)

AMC 10 Final Fives
Friday, Aug 15 - Sep 12
Sunday, Sep 7 - Sep 28
Tuesday, Sep 9 - Sep 30
Monday, Sep 22 - Oct 13
Sunday, Sep 28 - Oct 19 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, Oct 8 - Oct 29
Thursday, Oct 9 - Oct 30

AMC 12 Problem Series
Wednesday, Aug 6 - Oct 22
Sunday, Aug 10 - Nov 2
Monday, Aug 18 - Nov 10
Mon & Wed, Sep 15 - Oct 22 (meets twice a week!)
Tues, Thurs & Sun, Oct 7 - Nov 2 (meets three times a week!)

AMC 12 Final Fives
Thursday, Sep 4 - Sep 25
Sunday, Sep 28 - Oct 19
Tuesday, Oct 7 - Oct 28

AIME Problem Series A
Thursday, Oct 23 - Jan 29

AIME Problem Series B
Tuesday, Sep 2 - Nov 18

F=ma Problem Series
Tuesday, Sep 16 - Dec 9
Friday, Oct 17 - Jan 30

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, Aug 14 - Oct 30
Sunday, Sep 7 - Nov 23
Tuesday, Dec 2 - Mar 3

Intermediate Programming with Python
Friday, Oct 3 - Jan 16

USACO Bronze Problem Series
Wednesday, Sep 3 - Dec 3
Thursday, Oct 30 - Feb 5
Tuesday, Dec 2 - Mar 3

Physics

Introduction to Physics
Tuesday, Sep 2 - Nov 18
Sunday, Oct 5 - Jan 11
Wednesday, Dec 10 - Mar 11

Physics 1: Mechanics
Sunday, Sep 21 - Mar 22
Sunday, Oct 26 - Apr 26
0 replies
jwelsh
Jul 1, 2025
0 replies
k i Adding contests to the Contest Collections
dcouchman   1
N Apr 5, 2023 by v_Enhance
Want to help AoPS remain a valuable Olympiad resource? Help us add contests to AoPS's Contest Collections.

Find instructions and a list of contests to add here: https://artofproblemsolving.com/community/c40244h1064480_contests_to_add
1 reply
dcouchman
Sep 9, 2019
v_Enhance
Apr 5, 2023
k i Zero tolerance
ZetaX   49
N May 4, 2019 by NoDealsHere
Source: Use your common sense! (enough is enough)
Some users don't want to learn, some other simply ignore advises.
But please follow the following guideline:


To make it short: ALWAYS USE YOUR COMMON SENSE IF POSTING!
If you don't have common sense, don't post.


More specifically:

For new threads:


a) Good, meaningful title:
The title has to say what the problem is about in best way possible.
If that title occured already, it's definitely bad. And contest names aren't good either.
That's in fact a requirement for being able to search old problems.

Examples:
Bad titles:
- "Hard"/"Medium"/"Easy" (if you find it so cool how hard/easy it is, tell it in the post and use a title that tells us the problem)
- "Number Theory" (hey guy, guess why this forum's named that way¿ and is it the only such problem on earth¿)
- "Fibonacci" (there are millions of Fibonacci problems out there, all posted and named the same...)
- "Chinese TST 2003" (does this say anything about the problem¿)
Good titles:
- "On divisors of a³+2b³+4c³-6abc"
- "Number of solutions to x²+y²=6z²"
- "Fibonacci numbers are never squares"


b) Use search function:
Before posting a "new" problem spend at least two, better five, minutes to look if this problem was posted before. If it was, don't repost it. If you have anything important to say on topic, post it in one of the older threads.
If the thread is locked cause of this, use search function.

Update (by Amir Hossein). The best way to search for two keywords in AoPS is to input
[code]+"first keyword" +"second keyword"[/code]
so that any post containing both strings "first word" and "second form".


c) Good problem statement:
Some recent really bad post was:
[quote]$lim_{n\to 1}^{+\infty}\frac{1}{n}-lnn$[/quote]
It contains no question and no answer.
If you do this, too, you are on the best way to get your thread deleted. Write everything clearly, define where your variables come from (and define the "natural" numbers if used). Additionally read your post at least twice before submitting. After you sent it, read it again and use the Edit-Button if necessary to correct errors.


For answers to already existing threads:


d) Of any interest and with content:
Don't post things that are more trivial than completely obvious. For example, if the question is to solve $x^{3}+y^{3}=z^{3}$, do not answer with "$x=y=z=0$ is a solution" only. Either you post any kind of proof or at least something unexpected (like "$x=1337, y=481, z=42$ is the smallest solution). Someone that does not see that $x=y=z=0$ is a solution of the above without your post is completely wrong here, this is an IMO-level forum.
Similar, posting "I have solved this problem" but not posting anything else is not welcome; it even looks that you just want to show off what a genius you are.

e) Well written and checked answers:
Like c) for new threads, check your solutions at least twice for mistakes. And after sending, read it again and use the Edit-Button if necessary to correct errors.



To repeat it: ALWAYS USE YOUR COMMON SENSE IF POSTING!


Everything definitely out of range of common sense will be locked or deleted (exept for new users having less than about 42 posts, they are newbies and need/get some time to learn).

The above rules will be applied from next monday (5. march of 2007).
Feel free to discuss on this here.
49 replies
ZetaX
Feb 27, 2007
NoDealsHere
May 4, 2019
A feasible refinement of GMA 567
Rhapsodies_pro   2
N 23 minutes ago by Rhapsodies_pro
Source: Own?
Let \(a_1,a_2,\dotsc,a_n\) (\(n>3\)) be non-negative real numbers fulfilling \[\sum_{k=1}^na_k^2+{\left(n^2-3n+1\right)}\prod_{k=1}^na_k\geqslant{\left(n-1\right)}^2\text.\]Prove or disprove: \[\frac1{n-1}\sum_{1\leqslant i<j\leqslant n}{\left(a_i-a_j\right)}^2\geqslant{\left({\left(n^2-2n-1\right)}\sum_{k=1}^na_k-n{\left(n-1\right)}{\left(n-3\right)}\right)}{\left(n-\sum_{k=1}^na_k\right)}\textnormal.\]
2 replies
Rhapsodies_pro
Jul 21, 2025
Rhapsodies_pro
23 minutes ago
China Mathematics Olympiads (National Round) 2007 Problem 5
Lei Lei   5
N 23 minutes ago by Assassino9931
Let $\{a_n\}_{n \geq 1}$ be a bounded sequence satisfying
\[a_n < \displaystyle\sum_{k=a}^{2n+2006} \frac{a_k}{k+1} + \frac{1}{2n+2007} \quad \forall \quad n = 1, 2, 3, \ldots \]
Show that
\[a_n < \frac{1}{n} \quad \forall \quad n = 1, 2, 3, \ldots\]
5 replies
Lei Lei
Nov 28, 2010
Assassino9931
23 minutes ago
Interesting
AlexCenteno2007   3
N 25 minutes ago by math90
For positive real numbers \( x_1, x_2, \dots, x_{n+1} \), prove that
\[
\frac{1}{x_1} + \frac{x_1}{x_2} + \frac{x_1 x_2}{x_3} + \cdots + \frac{x_1 x_2 \cdots x_n}{x_{n+1}} \geq 4\left(1 - x_1 x_2 \cdots x_{n+1}\right).
\]
3 replies
AlexCenteno2007
Yesterday at 2:33 AM
math90
25 minutes ago
Strip region coverage
c7h5n3o6_tnt   1
N 29 minutes ago by c7h5n3o6_tnt
Let \( S \) be an infinite set of points on a plane. Any 3 points in \( S \) can be covered by a strip region with a width of $1$. Prove that \( S \) can be covered by a strip region with a width of $2$.
1 reply
c7h5n3o6_tnt
Yesterday at 3:16 PM
c7h5n3o6_tnt
29 minutes ago
Perpendicularity
April   35
N Yesterday at 10:14 PM by Schintalpati
Source: CGMO 2007 P5
Point $D$ lies inside triangle $ABC$ such that $\angle DAC = \angle DCA = 30^{\circ}$ and $\angle DBA = 60^{\circ}$. Point $E$ is the midpoint of segment $BC$. Point $F$ lies on segment $AC$ with $AF = 2FC$. Prove that $DE \perp EF$.
35 replies
April
Dec 28, 2008
Schintalpati
Yesterday at 10:14 PM
IMO Shortlist 2011, G1
WakeUp   46
N Yesterday at 9:38 PM by Kempu33334
Source: IMO Shortlist 2011, G1
Let $ABC$ be an acute triangle. Let $\omega$ be a circle whose centre $L$ lies on the side $BC$. Suppose that $\omega$ is tangent to $AB$ at $B'$ and $AC$ at $C'$. Suppose also that the circumcentre $O$ of triangle $ABC$ lies on the shorter arc $B'C'$ of $\omega$. Prove that the circumcircle of $ABC$ and $\omega$ meet at two points.

Proposed by Härmel Nestra, Estonia
46 replies
WakeUp
Jul 13, 2012
Kempu33334
Yesterday at 9:38 PM
Midpoints of altitudes and concurrent cevians
darij grinberg   9
N Tuesday at 2:42 PM by nsato
Source: 2nd homework problem set of the IMO training 2004, geometry, problem 1
Let $ ABC$ be a triangle. Let $ A_1$, $ B_1$, $ C_1$ be the midpoints of its sides $ BC$, $ CA$, $ AB$, and $ A_2$, $ B_2$, $ C_2$ the midpoints of the altitudes from $ A$, $ B$, $ C$. Show that the lines $ A_1A_2$, $ B_1B_2$, and $ C_1C_2$ meet at one point.
9 replies
darij grinberg
Jul 5, 2004
nsato
Tuesday at 2:42 PM
Steiner line and isogonal lines
flower417477   1
N Jul 22, 2025 by flower417477
$\odot O$ is the circumcircle of $\triangle ABC$,$H$ is the orthocenter of $\triangle ABC$
$D$ is an arbitrary point on $\odot O$
$E$ is the reflection point of $D$ wrt $BC$,$EH$ meet $OD$ at $F$.
$K$ is the reflection point of $A$ wrt $OH$.
$P$ is a point on $\odot O$ such that $PK$ is parallel to $BC$,$Q$ is a point on $OH$ such that $PQ$ is parallel to $EH$.
$N$ is the circumcenter of $\triangle PQK$
Prove that $AF,AN$ is a pair of isogonal lines wrt $\angle BAC$
1 reply
flower417477
Jul 18, 2025
flower417477
Jul 22, 2025
Rectangle EFGH in incircle, prove that QIM = 90
v_Enhance   70
N Jul 21, 2025 by hectorleo123
Source: Taiwan 2014 TST1, Problem 3
Let $ABC$ be a triangle with incenter $I$, and suppose the incircle is tangent to $CA$ and $AB$ at $E$ and $F$. Denote by $G$ and $H$ the reflections of $E$ and $F$ over $I$. Let $Q$ be the intersection of $BC$ with $GH$, and let $M$ be the midpoint of $BC$. Prove that $IQ$ and $IM$ are perpendicular.
70 replies
v_Enhance
Jul 18, 2014
hectorleo123
Jul 21, 2025
Show that AB/AC=BF/FC
syk0526   78
N Jul 21, 2025 by Kempu33334
Source: APMO 2012 #4
Let $ ABC $ be an acute triangle. Denote by $ D $ the foot of the perpendicular line drawn from the point $ A $ to the side $ BC $, by $M$ the midpoint of $ BC $, and by $ H $ the orthocenter of $ ABC $. Let $ E $ be the point of intersection of the circumcircle $ \Gamma $ of the triangle $ ABC $ and the half line $ MH $, and $ F $ be the point of intersection (other than $E$) of the line $ ED $ and the circle $ \Gamma $. Prove that $ \tfrac{BF}{CF} = \tfrac{AB}{AC} $ must hold.

(Here we denote $XY$ the length of the line segment $XY$.)
78 replies
syk0526
Apr 2, 2012
Kempu33334
Jul 21, 2025
incircle with center I of triangle ABC touches the side BC
orl   41
N Jul 21, 2025 by Kempu33334
Source: Vietnam TST 2003 for the 44th IMO, problem 2
Given a triangle $ABC$. Let $O$ be the circumcenter of this triangle $ABC$. Let $H$, $K$, $L$ be the feet of the altitudes of triangle $ABC$ from the vertices $A$, $B$, $C$, respectively. Denote by $A_{0}$, $B_{0}$, $C_{0}$ the midpoints of these altitudes $AH$, $BK$, $CL$, respectively. The incircle of triangle $ABC$ has center $I$ and touches the sides $BC$, $CA$, $AB$ at the points $D$, $E$, $F$, respectively. Prove that the four lines $A_{0}D$, $B_{0}E$, $C_{0}F$ and $OI$ are concurrent. (When the point $O$ concides with $I$, we consider the line $OI$ as an arbitrary line passing through $O$.)
41 replies
orl
Jun 26, 2005
Kempu33334
Jul 21, 2025
too much tangencies these days...
kamatadu   2
N Jul 19, 2025 by mudkip42
Source: Cut The Knot
Let $\Omega$ be a circle and $\gamma_1,\gamma_2$ be circles internally tangent to $\Omega$ at $P$ and $Q$. Assume that $\gamma_1$ and $\gamma_2$ are also externally tangent at point $T$. Prove that the line through $P$ perpendicular to $PT$ meets line $QT$ on $\Omega$.
2 replies
kamatadu
Jan 20, 2023
mudkip42
Jul 19, 2025
Chords and tangent circles
math154   28
N Jul 19, 2025 by Kempu33334
Source: ELMO Shortlist 2012, G4
Circles $\Omega$ and $\omega$ are internally tangent at point $C$. Chord $AB$ of $\Omega$ is tangent to $\omega$ at $E$, where $E$ is the midpoint of $AB$. Another circle, $\omega_1$ is tangent to $\Omega, \omega,$ and $AB$ at $D,Z,$ and $F$ respectively. Rays $CD$ and $AB$ meet at $P$. If $M$ is the midpoint of major arc $AB$, show that $\tan \angle ZEP = \tfrac{PE}{CM}$.

Ray Li.
28 replies
math154
Jul 2, 2012
Kempu33334
Jul 19, 2025
Lots of perpendiculars; compute HQ/HR
MellowMelon   56
N Jul 18, 2025 by Kempu33334
Source: USA TST 2011 P1
In an acute scalene triangle $ABC$, points $D,E,F$ lie on sides $BC, CA, AB$, respectively, such that $AD \perp BC, BE \perp CA, CF \perp AB$. Altitudes $AD, BE, CF$ meet at orthocenter $H$. Points $P$ and $Q$ lie on segment $EF$ such that $AP \perp EF$ and $HQ \perp EF$. Lines $DP$ and $QH$ intersect at point $R$. Compute $HQ/HR$.

Proposed by Zuming Feng
56 replies
MellowMelon
Jul 26, 2011
Kempu33334
Jul 18, 2025
Weird expression being integer.
MarkBcc168   25
N Jul 11, 2025 by Ilikeminecraft
Source: IMO Shortlist 2017 N5
Find all pairs $(p,q)$ of prime numbers which $p>q$ and
$$\frac{(p+q)^{p+q}(p-q)^{p-q}-1}{(p+q)^{p-q}(p-q)^{p+q}-1}$$is an integer.
25 replies
MarkBcc168
Jul 10, 2018
Ilikeminecraft
Jul 11, 2025
Weird expression being integer.
G H J
G H BBookmark kLocked kLocked NReply
Source: IMO Shortlist 2017 N5
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MarkBcc168
1631 posts
#1 • 6 Y
Y by Amir Hossein, yayitsme, megarnie, Adventure10, Mango247, deplasmanyollari
Find all pairs $(p,q)$ of prime numbers which $p>q$ and
$$\frac{(p+q)^{p+q}(p-q)^{p-q}-1}{(p+q)^{p-q}(p-q)^{p+q}-1}$$is an integer.
This post has been edited 1 time. Last edited by MarkBcc168, Jul 10, 2018, 11:27 AM
Reason: use ISL wording
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MarkBcc168
1631 posts
#2 • 9 Y
Y by Amir Hossein, me9hanics, MatBoy-123, kawazmlekiem, megarnie, ILOVEMYFAMILY, DrYouKnowWho, Adventure10, Mango247
Really straightforward for N5.

Solution
This post has been edited 1 time. Last edited by MarkBcc168, Dec 30, 2020, 2:37 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6906 posts
#3 • 6 Y
Y by samoha, Amir Hossein, me9hanics, v4913, HamstPan38825, Adventure10
For brevity let $a = p+q$ and $b = p-q$, so $a > b$ and $\gcd(a,b) \le 2$. Then we have in the usual way that \begin{align*} 	a^b b^a - 1 &\mid a^a b^b - 1 \\ 	\implies a^b b^a - 1 &\mid a^a b^b - a^b b ^a \\ 	&= (ab)^b \left( a^{a-b} - b^{a-b} \right) \\ 	\implies a^b b^a - 1 &\mid a^{a-b} - b^{a-b} \\ 	&= a^{2q} - b^{2q} \\ 	&= 4pq \cdot \frac{a^{2q}-b^{2q}}{a^2-b^2}. \end{align*}
Claim: There are no solutions for $q \ge 5$.

Proof. Assume $q > 2$. In that case $a$ and $b$ are even. Let $r = \sqrt{a^b b^a}$, meaning $r$ is even and $r^2-1$ divides the expression above. First, \begin{align*} 	r &= (p+q)^{\frac{1}{2}(p-q)} (p-q)^{\frac{1}{2}(p+q)} \\ 	\implies r &\equiv (-1)^{\frac{1}{2}(p+q)} q^p \pmod p \\ 	&\equiv (-1)^{\frac{1}{2}(p+q)} q \pmod p \end{align*}and since $p \ge q+2$, it follows $r \pm 1 \not\equiv 0 \pmod p$.

Consequently $(r-1)(r+1)$ divides $T = q \cdot \frac{a^{2q}-b^{2q}}{a^2-b^2}$. However by cyclotomic arguments, all prime factors of $T$ are $1 \pmod q$ or $q$.

So we conclude $r-1$ and $r+1$ are in $\{0,1\} \pmod q$. Hence $q \le 3$ as desired. $\blacksquare$

Now we grind through the $q=2$ and $q=3$ cases.
  • For $q=2$, we arrive at \[ a^b b^a - 1 \mid 4(a+b) (a^2+b^2). \]If $p \ge 5$ then $a \ge 7$, $b \ge 3$ and so $a^b b^a \ge a^3 \cdot b^3 \cdot 3^4 > 16a^3b^3$ which is a contradiction. On the other hand $(p,q) = (3,2) \iff (a,b)=(5,1)$ is evidently a solution.
  • Similarly, for $q=3$ we get \[ a^b b^a - 1 \mid 6(a+b)(a^4+a^2b^2+b^4) \]If $p \ge 11$ then $a \ge 14$, $b \ge 8$ and $a^b b^a \ge a^7 b^7 \cdot 8^6 > 36 a^7 b^7$ which is a contradiction. On the other hand neither $(p,q)=(5,3) \iff (a,b)=(8,2)$ nor $(p,q)=(7,3) \iff (a,b) = (10,4)$ are solutions, since:
    • If $(a,b)=(8,2)$ then $a^b b^a = 2^{14}-1$, which is divisible by $43 \mid 2^7+1$. But $6(a+b)(a^4+a^2b^2+b^4) = 6 \cdot 10 \cdot 4368$ is not divisible by $43$.
    • If $(a,b)=(10,4)$ then $a^b b^a = 10^4 \cdot 4^{10} - 1 = 320^4 - 1$, which is divisible by $11$ (dividing $319$). But $6(a+b)(a^4+a^2b^2+b^4) = 6 \cdot 14 \cdot 11856$, which is not divisible by $11$.

In conclusion, the only solution is $(p,q)=(3,2)$ which visibly works.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
anantmudgal09
1980 posts
#4 • 8 Y
Y by Wizard_32, p_square, Pluto1708, khina, Ankoganit, Adventure10, Mango247, math_comb01
Quotes on this at PDC:
"Remember kids, $n^2-1$ factors as $(n-1)(n+1)$."
"Primes are odd". "Uh, except $2$ right?" "No one cares [insert person name]".
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
juckter
329 posts
#5 • 2 Y
Y by Adventure10, Mango247
Kind of boring, but ok as N5

Let $M = (p + q)^{p - q}(p - q)^{p + q} - 1$, then $M$ divides $(p + q)^{p + q}(p - q)^{p + q} - (p + q)^2q$. If the problem condition holds then it also divides $(p + q)^{p + q}(p - q)^{p + q} - (p - q)^2q$. Subtracting we find that

$$M \mid (p + q)^{2q} - (p - q)^{2q}$$
Let $r$ be any prime dividing $M$. Then $r \mid (p + q)^{2q} - (p - q)^{2q}$ and $(p + q)^{2q} \equiv (p - q)^{2q} \pmod{r}$. Clearly $r$ is relatively prime to both $p + q$ and $p - q$ because it divides $M$. Then the previous congruence implies that

$$\left(\frac{p + q}{p - q}\right)^{2q} \equiv 1 \pmod{r}$$
Implying that the order of $\frac{p + q}{p - q}$ divides $2q$. We assume for the moment that $q > 2$ and deal with this case at the end. Assume first that the order is not divisible by $q$. Then it divides $2$ and therefore

$$(p + q)^2 \equiv (p - q)^2 \pmod{q} \implies r \mid 4pq$$
This implies that $r = 2$, $r = p$ or $r = q$. The first case is impossible because $q > 2$ implies that $p - q$ and $p + q$ are even and $M$ is odd. Now, if $r = p$ then $p \mid M$ implies that

$$0 \equiv (p + q)^{p - q}(p - q)^{p + q} - 1 \equiv q^{2p} \pmod{p}$$
Implying that the order of $q \pmod{p}$ divides $2p$. Because it is at most $p - 1$ it follows that the order divides $2$ and $p \mid q^2 - 1 = (q - 1)(q + 1)$ which is impossible as $p \geq q + 2$.

Finally if $r = q$ then similarly we find that $p^{2p} \equiv 1 \pmod{q}$ and the order of $p \pmod{q}$ must divide $2$, so $q \mid (p - 1)(p + 1)$ and $p = kq \pm 1$ for some positive integer $k$ and some choice of sign. Because both $p$ and $q$ are odd, it follows that $k$ is even. Now recall that $M$ must divide $(p + q)^{2q} - (p - q)^{2q}$. If $k \geq 4$ then the exponent of $p + q$ in $M$ is greater than $2q$, and $M > (p + q)^{2q} - (p - q)^{2q}$, contradicting that $M$ must divide this expression. Thus $k \leq 3$ and the only possibility is that $k = 2$. We now deal with these two cases.

If $p = 2q + 1$.

Then $M = (q + 1)^{3q + 1}(3q + 1)^{q + 1} - 1$ must divide $(3q + 1)^{2q} - (q + 1)^{2q}$, which implies that $(q + 1)^{3q + 1} \leq (3q + 1)^{q - 1}$. However this is false for every $q$ because

$$(q + 1)^{3q} = ((q + 1)^2(q + 1))^q > (3(q + 1))^q > (3q + 1)^q > (3q + 1)^{q - 1}$$
If $p = 2q - 1$.

Then $M = (q - 1)^{3q - 1}(3q + 1)^{q - 1} - 1$ divides $(3q - 1)^{2q} - (q - 1)^{2q}$. We must now have $(q - 1)^{3q - 1} \leq (3q - 1)^{q + 1}$, so we must have $(q - 1)^{3 - 1/q} \leq (3q - 1)^{1 + 1/q} \leq (4q - 4)^{1 + 1/q}$. The inequality now reduces to

$$(q - 1)^{2 - 2/q} \leq 4^{1 + 1/q}$$
If $q \geq 5$ then $q - 1 \geq 4$ and we must have $2 - 2/q \leq 1 + 1/q$ which gives $q \leq 3$, a contradiction. If $q = 3$ then $p = 5$ which we easiy can prove doesn't satisfy the condition.

In all remaining cases the order of $\frac{p + q}{p - q} \pmod{r}$ must be divisible by $q$, implying that $q$ divides $r - 1$, and therefore every prime divisor of $M$ is congruent to $1$ modulo $q$. Now, we have

$$M = \left((p + q)^{\frac{p - q}{2}}(p - q)^{\frac{p + q}{2}} - 1\right)\left((p + q)^{\frac{p - q}{2}}(p -q)^{\frac{p + q}{2}} + 1\right)$$
Each of these factors must be congruent to $1 \mod q$ because all of their prime divisors is, but this is impossible because they differ by $2$ and $q$ is not $2$.

Finally, if $q = 2$ then $M = (p + 2)^{p - 2}(p - 2)^{p + 2} - 1$ must divide $(p + 2)^4 - (p - 2)^4$. This is impossible for size reasons if $p \geq 7$. If $p = 5$ then $M = 7^33^7 - 1$ divides $7^4 - 3^7$ which once again doesn't hold for size reasons. Finally if $p = 3$ we find that

$$\frac{5^51^1 - 1}{5^11^5 - 1} = \frac{3124}{4} = 781$$
Is an integer, so this is the only pair that works.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
DrMath
2130 posts
#6 • 3 Y
Y by AlgebraFC, Adventure10, Mango247
Subtracting one from the fraction, we get $(p+q)^{p-q}(p-q)^{p+q}-1\mid [(p-q)(p+q)]^{p-q}[(p+q)^{2q}-(p-q)^{2q}]$. Now, if $r$ is a prime and divides $(p+q)(p-q)$, it cannot divide the LHS, so we get $$(p+q)^{p-q}(p-q)^{p+1}-1\mid (p+q)^{2q}-(p-q)^{2q}$$Thus, as a preliminary bound we get $p-q<2q$ or $p<3q$. From here on, assume $q>2$, so both $p,q$ are odd.

Suppose $r$ is a prime that divides the LHS. Then $r$ divides the RHS and is relatively prime to $(p+q)(p-q)$, so we get $r\mid \left(\frac{p+q}{p-q}\right)^{2q}-1$. Now, if $q\nmid r-1$, we get $r\mid (p+q)^2-(p-q)^2=4pq$, so $r\in \{2,p,q\}$. But $2$ cannot divide the LHS, so we are limited to $r=p$ or $r=q$. Suppose $r=p$; then $p\mid (p+q)^{p-q}(p-q)^{p+q}-1$ or $p\mid q^{2p}-1$. Thus $p\mid q^2-1=(q-1)(q+1)$, but this contradicts $p>q$. Thus, the only possibility is $r=q$. Otherwise, $r\equiv 1\pmod{q}$. Thus, every prime factor of the LHS is either $q$ or $1\pmod{q}$.

On the other hand, if we write $X=(p+q)^{\frac{p-q}{2}}(p-q)^{\frac{p+q}{2}}$, then the LHS can be written as $X^2-1$. On the other hand, every factor of $X^2-1$ is either $0$ or $1\pmod{q}$. Thus, $X-1, X+1\in \{0,1\}\pmod{q}$. The only way this can happen for $q>2$ is if $q=3$ and $X\equiv 2\pmod{3}$. Now, since $q=3$ we merely need to test $p<9$, or $p=5,7$. It is easy to check these cases fail. This exhausts all the cases for when $q$ is odd.

Finally, checking $q=2$, we need $p<6$ or $p=3,5$. The only value of $p$ which works is $3$, and we get the ordered pair $\boxed{(3,2)}$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pavel kozlov
618 posts
#7 • 3 Y
Y by brokendiamond, Adventure10, Mango247
Let $A=(p+q)^{p+q}(p-q)^{p-q}-1, B=(p+q)^{p-q}(p-q)^{p+q}-1$.
First we get that $q<p\leq3q$ as in the beginning of the first solution and also we do $q=2$ case work.
Secondly we look at any prime divisor $t$ of $B$ and do some casework (excluding cases $t|(p+q)^2-(p-q)^2$ and $t|((p^2-q^2)^2-1$), after what we get that $t \equiv 1 \mod pq$.

Here one can get stucked if he don't notice a simple fact that $B$ if of the form $n^2-1$. But there is a brute force finish in this case. Let's look.

Every prime of $B$ has remainder $1$ modulo $pq$, so $B$ itself has remainder $1$ modulo $pq$.
$B \equiv 1 \mod p$ means $p|q^{2p}-2$ or $p|q^2-2$, so $q^2-2=sp$ with an integer $s$.
Futher, $B \equiv 1 \mod q$ means $p^{2p}\equiv 2 \mod q$, hence $p^{-2}\equiv p^{2(q^2-2)}=p^{2sp}\equiv 2^s \mod q$, or, equivalently, $p^2\equiv 2^{-s} \mod q$.
Taking each part of congruence into degree $p$ we get $-2^{sp}\equiv p^{2p} \equiv 2 \mod q$, so $q|2^{sp-1}+1$.
If $r$ is order of $2$ modulo $q$ then $r|(2(q^2-3),(q-1))\leq 4$, so the only thing left to do is to check primes $q|15$.
This post has been edited 2 times. Last edited by pavel kozlov, Jul 17, 2018, 2:50 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pad
1671 posts
#8 • 1 Y
Y by Mango247
Suppose $q\not = 2$ for now. Let $a=p+q,b=p-q$. Then $a^bb^a-1\mid a^ab^b-1$, so $a^bb^a-1\mid a^ab^b-a^bb^a = a^bb^b(a^{a-b}-b^{a-b})$. But $\gcd(a^bb^a-1,a^bb^b)=1$, so $a^bb^a-1\mid a^{2q}-b^{2q}$. Suppose a prime $r$ divides $a^bb^a-1$. Note that $r$ is odd since $a,b$ are even. Then $r\mid a^{2q}-b^{2q}$, so the order of $a/b$ mod $r$ divides $2q$, so it is in the set $\{1,2,q,2q\}$.

If the order is 1 or 2, then $a^2\equiv b^2 \pmod{r}$, i.e. $(p+q)^2-(p-q)^2=4pq \equiv 0 \pmod{r}$, so $r \in \{p,q\}$. However, if $r=p$, then
\[ 0\equiv (p+q)^{p-q}(p-q)^{p+q}-1\equiv q^{p-q}\cdot (-q)^{p+q}-1 \equiv q^{2p}-1 \equiv q^2-1 \pmod{p} \]which is not possible, since $p>q$. If $r=q$, then
\[ 0\equiv (p+q)^{p-q}(p-q)^{p+q}-1 \equiv p^{p-q}\cdot p^{p+q}-1 \equiv p^{2p}-1\pmod{q}.\]Now the order of $p \pmod{q}$ divides $2p$, so it is in the set $\{1,2,p,2p\}$. It also divides $q-1$, which is a contradiction if the order is $p$ or $2p$, which means the order of $p\pmod q$ is 1 or 2. But then $p^2\equiv 1 \pmod{q}$, so $q\mid (p-1)(p+1)$, contradiction.

Therefore, the order of $a/b$ mod $r$ is $q$ or $2q$. But it also divides $r-1$, so $q\mid r-1$. Hence, $r\equiv 1 \pmod{q}$, so every prime factor of $a^bb^a-1$ is $q$ or 1 mod $q$. But $a,b$ are even, so $a^bb^a=k^2$ for some $k$. So $a^bb^a-1=(k-1)(k+1)$, which means every prime factor of $k-1,k+1$ are 0,1 mod $q$, and in particular $k-1,k+1$ are both 0 or 1 mod $q$. This is impossible unless $q=2$ or $q=3$.

We conclude that $q \in \{2,3\}$. A check on these both gives that the only solution is $(p,q)=(3,2)$.

Remarks
This post has been edited 1 time. Last edited by pad, Jun 13, 2020, 6:32 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
TheUltimate123
1753 posts
#9
Y by
Solved with nukelauncher. Since the denominator is relatively prime with \(p+q\) and \(p-q\), it is equivalent to note that \[\frac1{(p+q)^{p-q}(p-q)^{p-q}}\left(\frac{(p+q)^{p+q}(p-q)^{p-q}-1}{(p+q)^{p-q}(p-q)^{p+q}-1}-1\right)=\frac{(p+q)^{2q}-(p-q)^{2q}}{(p+q)^{p-q}(p-q)^{p+q}-1}\]is an integer.

The only pair that works is \((3,2)\). We can easily verify this is the only solution for \(q\le3\) by applying the following claim and finite-case checking:

Claim: \(p<2q\)

Proof. We know that \((p+q)^{p-q}(p-q)^{p+q}-1\) divides \((p+q)^{2q}-(p-q)^{2q}\). But if \(p\ge2q\), then \[(p+q)^{p-q}(p-q)^{p+q}-1\ge(p+q)^{2p-2q}-1\ge(p+q)^{2q}-(p-q)^{2q},\]absurd. \(\blacksquare\)

Henceforth assume \(q\ge5\). Then \(p+q\) and \(p-q\) are even, so define \[s:=(p+q)^{(p-q)/2}(p-q)^{(p+q)/2}-1.\]Let \(r\) be a prime dividing \(s^2-1\), so \(r\) divides \((p+q)^{p+q}(p-q)^{p-q}-1\).

Claim: Either \(r=q\) or \(q\) divides \(r-1\).

Proof. Recall that \(s^2-1\) divides \((p+q)^{2q}-(p-q)^{2q}\), so \[\left(\frac{p+q}{p-q}\right)^{2q}\equiv1\pmod r.\]It follows that \(\operatorname{ord}_r(\frac{p+q}{p-q})\in\{1,2,q,2q\}\).
  • If \(\operatorname{ord}_r(\frac{p+q}{p-q})\in\{q,2q\}\), then \(q\mid r-1\).
  • Otherwise \(\operatorname{ord}_r(\frac{p+q}{p-q})\in\{1,2\}\), and so \[r\mid\left(\frac{p+q}{p-q}\right)^2-1\mid(p+q)^2-(p-q)^2=4pq.\]
    • Since \(s^2-1\) is odd, \(r\ne2\).
    • If \(r=p\), then \[0\equiv s^2-1\equiv q^{2p}-1\equiv q^2-1\pmod p,\]so \(p\) divides either \(q-1\) or \(q+1\). This is absurd by \(p>q\).
    Hence \(r=q\).
\(\blacksquare\)

It follows that both \(s-1\) and \(s+1\) are either 0 or 1 modulo \(q\). This is impossible under our assumption that \(q\ge5\).
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IndoMathXdZ
696 posts
#10
Y by
MarkBcc168 wrote:
Find all pairs $(p,q)$ of prime numbers which $p>q$ and
$$\frac{(p+q)^{p+q}(p-q)^{p-q}-1}{(p+q)^{p-q}(p-q)^{p+q}-1}$$is an integer.
Not so great of a problem but quite ok for N5.
\begin{align*}
(p + q)^{p - q}(p - q)^{p + q} - 1 &\mid (p + q)^{p + q} (p - q)^{p - q} - 1 \\
(p + q)^{p - q} (p - q)^{p + q} - 1 &\mid (p + q)^{p + q} (p - q)^{p - q} - (p + q)^{p - q} (p - q)^{p + q} \\
(p + q)^{p - q} (p - q)^{p + q} - 1 &\mid (p + q)^{p - q} (p - q)^{p - q} ( (p + q)^{2q} - (p - q)^{2q} ) \\
(p + q)^{p - q} (p - q)^{p + q} - 1 &\mid (p + q)^{2q} - (p - q)^{2q} 
\end{align*}Claim 01. $p < 3q$.
Proof. Notice that $(p + q)^{2q} > (p - q)^{2q}$, and by divisibility criteria, we have
\[ (p + q)^{p - q} - 1 \le (p + q)^{p - q}(p - q)^{p + q} - 1 \le (p + q)^{2q} - (p - q)^{2q} \le (p + q)^{2q} - 1 \]Therefore, we conclude that $p - q \le 2q$, but since $p$ and $q$ are both primes, we conclude that $p < 3q$.
Claim 02. If $q = 2$, then the only solution is $(3,2)$.
Proof. By the previous claim, we have $p \le 3q$, so we just need to check $(3,2)$ and $(5,2)$. Notice that $(3,2)$ obviously satisfies, and therefore $(3,2)$ is a solution.
Now, we may assume that $p  > q \ge 3$ are both odd, and therefore $p + q$ and $p - q$ are both even.
Claim 03. If $r \mid (p + q)^{p - q} (p - q)^{p + q} - 1$, then either $r = q$ or $r \equiv 1 \ (\text{mod} \ q)$.
Proof. We have
\[ r \mid (p + q)^{p - q} (p - q)^{p + q} - 1 \mid (p + q)^{2q} - (p - q)^{2q} \]Then, we have $o_r \left( \frac{p + q}{p - q} \right) \mid 2q$. Suppose that $q \nmid o_r \left( \frac{p + q}{p - q} \right)$, then we have \[ r \mid (p + q)^2 - (p - q)^2 = 4pq \]For obvious reason, $\gcd(r,4) = 1$ since $(p + q)^{p - q} - (p - q)^{p + q}$ is even. Now, we have $r = p$ or $r = q$.
If $r = p$, then
\[ p \mid (p + q)^{p - q} (p - q)^{p + q} -  1 \Rightarrow p \mid q^{2p} - 1 \]By Fermat Little Theorem, $p \mid (q^p)^2 - 1$, and therefore $p \mid q^2 - 1$. However, we know that $p \ge q + 2$ and $p \mid (q - 1)(q + 1)$. This is a contradiction.
We now have that for all primes $r$ such that
\[ r \mid (p + q)^{p - q} (p - q)^{p + q} - 1 \]then $r \equiv 0, 1 \ (\text{mod} \ q)$.
For me, this is the trickiest part of the solution, as everything else flows naturally: Let $N = (p + q)^{\frac{p - q}{2}} (p - q)^{\frac{p + q}{2}}$, which is an integer since $p - q$ and $p + q$ are both even. Therefore,
\[ r \mid N^2 - 1 \Rightarrow r \mid (N - 1)(N + 1) \]Now, we conclude that $\{ N - 1, N + 1 \} \equiv \{ 0, 1 \} \ (\text{mod} \ q)$. Now, notice that $(N + 1) - (N - 1) \in \{ 1, 0, -1 \} \ (\text{mod} \ q)$. This pretty much gives us $q \le 3$. Since we have $q \ge 3$, this forces $q = 3$.
Hence, from our first claim, we just need to check $p < 3q = 9$, which means we just need to check $(5,3)$ and $(7,3)$, both of which don't work.

Remark. This problem is really intimidating, yet the housekeeping (standard order stuffs to simplify things) did most of the tricks.
However, this thing is quite popular among order problems: that if you conclude that the prime divisors of $a$ is either $0$ or $1$ modulo $q$, then $a$ must be either $0$ or $1$ modulo $q$. Once you realized that $(p + q)^{p - q} (p - q)^{p + q} - 1 = N^2 - 1$ for some $N \in \mathbb{N}$, we are pretty much done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathaddiction
308 posts
#11
Y by
The answer is $(p,q)=(3,2)$, which obviously works.

We now show that it is the only solution. Notice that $p+q, p-q$ are both relatively prime with the denominator. As a result,
\begin{align*}
1&\equiv(p+q)^{p+q}(p-q)^{p-q}\\
&\equiv(p+q)^{p-q}(p-q)^{p+q}(p+q)^{2q}(p-q)^{2q}\\
&\equiv\left(\frac{p+q}{p-q}\right)^{2q}\pmod{(p+q)^{p-q}(p-q)^{p+q}-1}\\
\end{align*}This implies
$$(p+q)^{p-q}(p-q)^{p+q}-1|(p+q)^{2q}-(p-q)^{2q}\hspace{20pt}(1)$$In particular, we have $(p+q)^{p-q}\leq (p+q)^{2q}$, therefore, $p\leq 3q$, so if $q=2$ then the only solution is $p=3$. Now supppose $q$ is odd.

CLAIM 1. $p<2q$.
Proof.
Suppose $p\geq 2q$, then from $(1)$ we have
$$(p-q)^{p+q}\leq (p+q)^{3q-p}\leq (p+q)^q$$Let $p=kq$, then
$$(k-1)^{p+q}q^q\leq (k+1)^q$$Notice that $k<3$, therefore $q=3$, from which we easily check that there is no solution. $\blacksquare$

CASE I: $q|(p+q)^{p-q}(p-q)^{p+q}-1$.
Then $q|p^{2p}-1$. Notice that the $\text{ord}_q(p)|q-1$, therefore, it can only be $2$. This implies
$p\equiv \pm 1\pmod q$
Therefore, $p=2q-1$, the equation becomes
$$(3q-1)^{q-1}(q-1)^{3q-1}-1|(3q-1)^{2q}-(q-1)^{2q}$$hence $(q-1)^{3q-1}\leq (3q-1)^{q+1}$, but by easy induction we have $(q-1)^{3q-1}>(3q-1)^{q+1}$ for $q\geq 5$, contradiction.

CASE II: $q\nmid (p+q)^{p-q}(p-q)^{p+q}-1$
Suppose $r$ is a prime such that $r|(p+q)^{p-q}(p-q)^{p+q}-1$
CLAIM 2. If $r\neq p$ then $r\equiv 1\pmod q$
Proof.
Since $(p+q)^{p-q}(p-q)^{p+q}-1$ is odd, $r\neq 2$.
Notice that $r\neq p,q$ by assumption, moreover,
$$1\equiv\left(\frac{p+q}{p-q}\right)^{2q}\pmod r$$Let the order of $\displaystyle\left(\frac{p+q}{p-q}\right)$ modulo $r$ be $d$, notice that $r$ cannot be $2$ or otherwise $r|(p+q)^2-(p-q)^2$ which implies $r|4pq$, contradiction.
Therefore, $q|d$, hence $q|d|r-1$ as desired. $\blacksquare$

Notice that $p-q,p+q$ are both even, let $a=(p+q)^{\frac{p-q}{2}}(p-q)^{\frac{p+q}{2}}-1$, $b=(p+q)^{\frac{p-q}{2}}(p-q)^{\frac{p+q}{2}}+1$. By LTE,
$$v_p(ab)\leq v_p((p+q)^{2q}-(p-q)^{2q})=1$$Therefore, if $v_p(ab)=0$, then we have $a\equiv b\equiv 1\pmod q$, hence $q=2$ since $b-a=2$. Otherwise, one of $a,b$ is congruent to $1$ mod $q$ while the other is congruent to $p$ mod $q$, hence $p=q+3$ or $2q-1$, the former is impossible and the latter is rejected in CASE I.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MatBoy-123
396 posts
#12 • 1 Y
Y by Mango247
Some orders and bounding is enough to solve...
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
hydo2332
435 posts
#13
Y by
Let $(p-q)^{p+q}(p+q)^{p-q} -1 = N$. Notice that the problem is equivalent to $(p+q)^{2q} - (p-q)^{2q} \equiv 0 \pmod N$ due to the fact that $(p,N) = (q,N)= 1$. And this implies that the order of the element $\frac{p+q}{p-q}$ is either $1,2,q,2q$ modulo $N (*)$. Now, we have $(p+q)^{p-q} < N \leq (p+q)^{2q} - (p-q)^{2q} < (p+q)^{2q}$, which means that $p < 3q$.
Claim. $p \leq 2q$ or $q =2$
Suppose that $2q < p < 3q$. We now have that $(3q)^{q}(q)^{3q} < (p+q)^{p-q}(p-q)^{p+q} - 1 \leq (p+q)^{2q} - (p-q)^{2q} < (4q)^{2q}
3^q \cdot q^{4q} < 4^{2q} \cdot q^{2q} \implies
3q^4 < 16q^2 \implies
3q^2 < 16 \implies
q = 2$ is the only possibility. Hence, the lemma follows.

Now, we divide into the cases of the orders, as said in $*$. Let $r$ be a prime dividing $N$. If the order is $1$ or $2$, we have that $r | 4pq$, and hence $r$ is either $2,p,q$. If $q=2$ we have that $p < 6$, so we just need to try the values. From now on, we assume $q \geq 3$, and hence $N$ is odd, ,so $r$ is either $p,q$. $r$ can't be $q$ because $p>q$ and can't be $p$ because $p \leq 2q$ by the claim.

Finally, if the order is $2q$ or $q$, we have that $2q | r-1$, which implies that every prime divisor of $N$ is of the form $1 + kq$ ,which implies $N \equiv 1 \pmod q$. But notice that $N$ is of the form $x^2 - 1$ for some $x$, and hence $(x-1)(x+1) \equiv 1 \pmod q$, which is not possible in this case.
Hence, the only solution is $(3,2)$, which comes from $q=2$ and trying $p < 3q$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
tigerzhang
351 posts
#14 • 1 Y
Y by Bradygho
The answer is $(p,q)=(3,2)$, which works.

Let $r$ be an arbitrary prime divisor of $(p+q)^{p-q}(p-q)^{p+q}-1$. Then, we must have $(p+q)^{p+q}(p-q)^{p-q} \equiv 1 \pmod{r}$. Thus, $$\frac{(p+q)^{p+q}(p-q)^{p-q}}{(p+q)^{p-q}(p-q)^{p+q}}=\left(\frac{p+q}{p-q}\right)^{2q} \equiv 1 \pmod{r}.$$If $\operatorname{ord}_r\left(\frac{p+q}{p-q}\right)$ is $1$ or $2$, then $(p+q)^2 \equiv (p-q)^2$, so $4pq \equiv 0 \mod r$. Therefore, either $r$ is even, $r=p$, or $r=q$. Otherwise, $q \mid \operatorname{ord}_r\left(\frac{p+q}{p-q}\right)$, so $r \equiv 1 \pmod{q}$. We have three cases.

Case 1: $q=2$. Then, $(p+2)^{p-2}(p-2)^{p+2}-1 \mid (p+2)^{p+2}(p-2)^{p-2}-1$, so \[(p+2)^{p-2}(p-2)^{p+2}-1 \mid (p+2)^{p+2}(p-2)^{p-2}-(p+2)^{p-2}(p-2)^{p+2}.\]Thus, we have $$(p+2)^{p-2}(p-2)^{p+2}-1 \mid (p+2)^4-(p-2)^4.$$If $p \geq 7$, then we have a contradiction because of size. We obtain that $p=3$ gives the solution $(3,2)$ and $p=5$ fails due to size reasons. Now, assume henceforth that $p$ and $q$ are even.

Case 2: $(p+q)^{p-q}(p-q)^{p+q}-1$ is divisible by $p$. Then, we have $$q^{p-q}(-q)^{p+q}=(-1)^{p+q}q^{2p} \equiv 1 \pmod{p}.$$Since $p$ and $q$ are even, we have $q^{2p} \equiv 1 \pmod{p}$, so $\operatorname{ord}_p(q) \mid \gcd(p-1,2p)=2$. Thus, $p \mid q^2-1$, so $p \mid \frac{q-1}{2}$ or $p \mid \frac{q+1}{2}$, which fails because $p>q$.

Case 3: $(p+q)^{p-q}(p-q)^{p+q}-1$ is divisible by $p$. If $(p+q)^{p-q}(p-q)^{p+q}-1$ is divisible by $q$, then, we have $p^{2p}-1 \equiv 0 \pmod{q}$, so $\operatorname{ord}_p(q) \mid \gcd(q-1,2p)$. Since $p>q$, we see that $\gcd(q-1,2p)=2$. Thus, $q \mid p^2-1$, so $q \mid p-1$ or $q \mid p+1$. If $q \mid p-1$, the prime factorization of $(p+q)^{p-q}(p-q)^{p+q}-1$ must consist of $\pm 1 \mod{q}$ primes. Thus, we $(p+q)^{p-q}(p-q)^{p+q}-1 \equiv \pm 1 \pmod{q}$. Since $$(p+q)^{p-q}(p-q)^{p+q}-1=\left((p+q)^{\frac{p-q}{2}}(p-q)^{\frac{p+q}{2}}-1\right)\left((p+q)^{\frac{p-q}{2}}(p-q)^{\frac{p+q}{2}}+1\right),$$and both factors cannot be $1 \mod{q}$, we are done in this case. Otherwise $q \mid p+1$. We can do a similar Euclidean algorithm as in Case 1 to obtain that $p=2q-1$. Now, we are done by bounding.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bora_olmez
277 posts
#15
Y by
The difficulty is spotting the difference of squares, otherwise, I agree that this is rather straightforward for an N5.
Solution
This post has been edited 1 time. Last edited by bora_olmez, Dec 24, 2021, 2:56 PM
Reason: less display mode
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mijail
139 posts
#16
Y by
My answer is $(p,q)=(3,2)$.
Suppose that $q>2$ so $p+q,p-q$ are eve, if we substract $1$ from the integer and remove the factors $p+q,p-q$ (we can do this because $p+q,p-q$ are coprimes with the denominator). We have that if $M = (p + q)^{p - q}(p - q)^{p + q} - 1$ then:
$$M \mid (p + q)^{2q} - (p - q)^{2q}$$The key idea is the following:
Key Claim: Let r be a prime divisor of $M$ then $r\equiv 1,0 \pmod{q}$
Proof: We have that: $$r \mid (p + q)^{2q} - (p - q)^{2q} \implies (\frac{p+q}{p-q})^{2q} \equiv 1 \pmod{r}$$Then $T= \operatorname{ord}_r\left(\frac{p+q}{p-q}\right)$ is divisor of $2q$ but also is divisor of $r-1$. But if $T$ is $q$ or $2q$ then $r\equiv 1 \pmod{q}$
And if $T$ is $1$ or $2$ then: $$(\frac{p+q}{p-q})^{2} \equiv 1 \pmod{r} \implies 4pq \equiv 0 \pmod{r}$$But $M$ is odd so $r=p$ or $r=q$.
If $r=p$ then: $$p \mid (p + q)^{p - q}(p - q)^{p + q} - 1 \implies p \mid (q)^{p - q}(- q)^{p + q} - 1  \implies p \mid q^{2p} - 1$$So by FLT: $p \mid q^{2} - 1   \implies p \mid (q-1)(q+1)$ then $p \leq q+1$ but $p>q$ and $p,q$ are odd so $p-q \ge 2$ (Contradiction!)

Then $r=q$ or $r\equiv 1 \pmod{q}$ $\square$.
Finally the claim implies that all divisor of $M$ is $\equiv 1,0 \pmod{q}$ but $M$ have divisors: $$M=((p + q)^{\frac{p - q}{2}}(p - q)^{\frac{p + q}{2}} - 1)((p + q)^{\frac{p - q}{2}}(p - q)^{\frac{p + q}{2}}+1)$$Then exists two divisors of $M$ with difference $2$ and both are $\equiv 1,0 \pmod{q}$ so the difference is $2 \equiv 1,0,-1 \pmod{q}$ then the unique possible value of $q$ is $3$.
Finally:
$$M \mid (p + q)^{2q} - (p - q)^{2q} \implies M\leq (p + q)^{2q} - (p - q)^{2q} \implies M \leq (p + q)^{2q} - 1 \implies (p + q)^{p - q}(p - q)^{p + q} \leq (p + q)^{2q}$$So we have: $(p - q)^{p + q} \leq (p + q)^{3q-p} \implies p<3q$. If $q=3 \implies p<9$ if $p=7  \implies 4^{10} \leq 100$ obvious this is false.
If $q=3,p=5$ then n the problem statement we replace: $ 2^{14}-1 \mid 2^{26}-1 \implies 14 \mid 26$ that is false.
If $q=2$ then $p<6$ if $p=5  \implies 3^{7}\leq 7$ is false.
Then the unique possible pair is $(p,q)=(3,2)$ that works.
This post has been edited 1 time. Last edited by mijail, Jan 24, 2022, 6:01 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
NoctNight
108 posts
#17 • 1 Y
Y by PRMOisTheHardestExam
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HamstPan38825
8902 posts
#18
Y by
The only pair is $(p, q) = (3, 2)$.

Assume first that $p, q$ are both odd primes. Then, let some prime $r \mid (p+q)^{p-q}(p-q)^{p+q} - 1$. Then, using the divisibility condition and dividing, we have $$\left(\frac{p+q}{p-q}\right)^{2q} \equiv 1 \pmod r.$$Thus, either $q \mid r-1$ or $$(p+q)^2 \equiv (p-q)^2 \pmod r \iff r \mid 4pq.$$If $r = p$, then $$1 \equiv (p+q)^{p-q}(p-q)^{p+q} \equiv q^{2p} \pmod p,$$hence $p \mid q^{2p} - 1$, or $p \mid q^2 - 1$. But this is obviously impossible as $p, q$ are both odd primes.

As a result, either $r=2$, which is impossible, or $r = q$. This crucially means that $(p+q)^{p-q}(p-q)^{p+q} - 1$ is the product of $q$ and $1 \bmod q$ primes. On the other hand, $$(p+q)^{p-q}(p-q)^{p+q} - 1 = ((p+q)^{(p-q)/2}(p-q)^{(p+q)/2}+1)((p+q)^{(p-q)/2}(p-q)^{(p+q)/2}-1),$$so each of these factors is $0$ or $1$ mod $q$. But this clearly implies $q \leq 3$.

Assuming that $q = 3$, we can reduce to a finite case check by showing that $p < 2q$. However, this is evident by size reasons, as otherwise $$\gcd((p+q)^{p-q}(p-q)^{p+q} - 1, (p+q)^{p+q}(p-q)^{p-q} - 1) = \gcd((p+q)^{p-q}(p-q)^{p+q} - 1, (p+q)^{2q} - (p-q)^{2q}).$$When $p>2q$, the former expression is always greater, but this contradicts divisibility.

Now, if $q=2$, testing cases and using the previous conclusion, we obtain $(3, 2)$ is the only solution.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
awesomeming327.
1784 posts
#19
Y by
Let $a=p+q$ and $b=p-q$. We have
\begin{align*} 
a^bb^a-1 &\mid a^ab^b-1 \\
a^bb^a-1 &\mid a^ab^b-a^bb^a \\
a^bb^a-1 &\mid a^bb^b(a^{a-b}-b^{a-b}) \\
a^bb^a-1 &\mid a^{2q} - b^{2q}
\end{align*}Thus, $\left(ab^{-1}\right)^{2q} \equiv 1\pmod {a^bb^a-1}$. Let $r$ be the smallest prime dividing $a^bb^a-1$ then $g=\text{ord}_r(ab^{-1})\mid 2q$ and $g\mid r-1$.

Suppose $q\ge 5$. Clearly, $r\neq 2$. If $g=1$ then $a\equiv b\pmod r$. If $g=2$ then $a\equiv -b\pmod r$. In the first case, $r\mid 2q$, so $r=q$. In the second, $r=p$. $r=p$ is clearly impossible since \[a^bb^a-1\equiv q^{p-q}q^{p+q}-1\equiv q^{2p}-1\equiv q^2-1\pmod p\]and $(q-1)$, $(q+1)$ are both coprime to $p$ since $p$ is a larger prime than $q$. If $g=q$ or $2q$ then $q\mid r-1$. Thus, the only prime factors of $a^bb^a-1$ are $0$ or $1 \pmod q$. Thus, any factor of $a^bb^a-1$ is also $0$ or $1\pmod q$. This is absurd, since $a^bb^a-1$ is one less than a perfect square and thus factors as $(t-1)(t+1)$ for some $t$, and one of them must break the $0$ or $1\pmod q$ rule.

Suppose $q=3$. We have $a$ and $b$ are even, and so \[a^bb^a-1\mid a^6-b^6\implies a^bb^a-1\mid (a/2)^6-(b/2)^6\]If $p>9$ then $2b>a$ so surely $(a/2)^6-(b/2)^6 < (a/2)^6 < b^6 < b^a <a^bb^a-1$ which implies $a=b$, absurd. Thus, $p=7$ or $p=5$. It can be verified that neither works.

Suppose $q=2$. We have $a$ and $b$ are both odd. We also have \[a^bb^a-1\mid a^4-b^4\]If $p>6$ then $b>4$ so $a^4-b^4<a^4\le a^b<a^bb^a-1$ and so $a=b$, again absurd. Thus, $p$ is $3$ or $5$, and it can easily be verified that $(3,2)$ is the only solution.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Leo.Euler
577 posts
#20
Y by
For notational purposes, let $a = p+q$ and $b=p-q$. Observe that $a^bb^a \equiv 1 \pmod{a^bb^a - 1}$, from which the divisibility is equivalent to \[ (a^bb^a-1) \mid a^{2q}-b^{2q}. \]Let $p_0$ be an odd prime divisor of $a^bb^a-1$. Then \[ \left(\frac{a}{b}\right)^{2q} \equiv 1 \pmod{p_0}, \]so the order of $a/b$ modulo $p_0$ is one of $1$, $2$, $q$, and $2q$. We proceed to do casework on these possible orders.
  • If the order is divisible by $q$, then $p_0 \equiv 1 \pmod{q}$.
  • If the order is $1$ or $2$, then in either case we have \[ (p+q)^2 \equiv (p-q)^2 \pmod{p_0}, \]from which $p_0 = p$ or $p_0 = q$.
If $p_0=p$, then \[ q^{2p} \equiv 1 \pmod{p}, \]so $p \mid q-1$ or $p \mid q+1$ by FLT. Neither are possible since $p>q$. Thus, each prime divisor of $a^bb^a-1$ is one of $q$ and $1 \pmod{q}$. In particular, $(a^bb^a-1)/q^{\nu_q(a^bb^a-1)}$ is $1 \pmod{q}$.

Notice that we can write \[ p_0 \mid (a^{b/2}b^{a/2}-1)(a^{b/2}b^{a/2}+1) \]and realize that $p_0$ must divide exactly one of the two factors. Since each factor is in $\{0, 1\} \pmod{q}$, and their difference is $2$, we must have $q=2$ or $q=3$. To check which $p$ work along with these values of $q$, we first bound $p$.

Claim: We have $p \le 2q$.
Proof. Recall that $(a^bb^a-1) \mid a^{2q}-b^{2q}$ from our initial discussion. Then show that the LHS is greater than the RHS when $p > 2q$, so $p \le 2q$.
:yoda:

Checking the resulting cases by hand returns $(3, 2)$ as the only solution.
This post has been edited 1 time. Last edited by Leo.Euler, Nov 30, 2023, 11:50 PM
Reason: typo
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math_comb01
665 posts
#21
Y by
anantmudgal09 wrote:
Quotes on this at PDC:
"Remember kids, $n^2-1$ factors as $(n-1)(n+1)$."
"Primes are odd". "Uh, except $2$ right?" "No one cares [insert person name]".
Posting for comedic reasons,
The key is to notice that $p^2-q^2=(p-q)(p+q)$
Notice then the equation rewrites as $(p+q)^{p-q}(p-q)^{p+q}-1 \mid (p+q)^{2q}-(p-q)^{2q}$ this also gives us the $p \leq 3q$ bound/ Let $a=p+q,b=p-q$
Claim:(Characterization of primes dividing $a^bb^a-1$) Every prime divisor $r$ of $a^bb^a-1$ must be of form $qk+1$ unless $p \equiv \pm 1 (\mod q)$
Proof
Suppose for now that every prime divisor is of form $qk+1$ then get a contradiction.
then use some inequalities for $p = 2q \pm 1$ to get the only solution $(3,2)$
This post has been edited 1 time. Last edited by math_comb01, Jan 25, 2024, 7:39 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
thdnder
199 posts
#22
Y by
Answer: $(p, q) = (2, 3)$ is the only solution.

Firstly, we'll prove that there is no solution if $q > 3$. Assume $q > 3$. Let $T = (p+q)^{p-q}(p-q)^{p+q} - 1$. Then note that $(p+q)^{p+q}(p-q)^{p-q} \equiv 1 (T)$ and $(p+q)^{p-q}(p-q)^{p+q} \equiv 1 (T)$, so $\frac{(p+q)^{p+q}(p-q)^{p-q}}{(p+q)^{p-q}(p-q)^{p+q}} = (\frac{p+q}{p-q})^{2q} \equiv 1 (T)$.

Since $T = (p+q)^{p-q}(p-q)^{p+q} - 1 = ((p+q)^{\frac{p-q}{2}}(p-q)^{\frac{p+q}{2}} - 1)((p+q)^{\frac{p-q}{2}}(p-q)^{\frac{p+q}{2}} + 1)$ and $(p+q)^{\frac{p-q}{2}}(p-q)^{\frac{p+q}{2}} - 1 \equiv p^p - 1 (q)$, $(p+q)^{\frac{p-q}{2}}(p-q)^{\frac{p+q}{2}} + 1 \equiv p^p + 1 (q)$, hence either $p^p + 1 \not\equiv 0, 1 (q)$ or $p^p - 1 \not\equiv 0, 1 (q)$. Therefore, there exists a prime $r$ such that $r \mid T$ and $r \not\equiv 0, 1 (q)$. But we have $(\frac{p+q}{p-q})^{2q} \equiv 1 (T)$, which means $((\frac{p+q}{p-q})^{2q} \equiv 1 (r))$, so $(\frac{p+q}{p-q})^r \equiv 1 (r)$, or equivalently, $r \mid 4pq$, a contradiction.

Now assume $q \le 3$. We split the problem into 2 cases:

Case 1: $q = 2$.

In this case, we have $(p+2)^{p-2}(p-2)^{p+2} - 1 \mid (p+2)^4 - (p-2)^4 = 16p(p^2 + 4)$. If $p \ge 5$, then $(p+2)^{p-2}(p-2)^{p+2} - 1 \ge (p+2)^3(p-2)^{p+2} - 1 \ge (p+2)^3 \cdot 2187 - 1 > 16p(p^2 + 4)$, so $p \le 3$, which forces $p = 3$ and we can easily check that $(2, 3)$ is a solution.

Case 2: $q = 3$.

If $p \ge 11$, then $(p+3)^{p-3}(p-3)^{p+3} - 1 \ge (p+3)^8 \cdot 5^11 - 1 > 36p(p^4 + 30p^2 + 81) = (p+3)^6 - (p-3)^6$, so $(p+3)^{p-3}(p-3)^{p+3} - 1 \nmid (p+3)^6 - (p-3)^6$, a contradiction. Hence $p$ equals $5$ or $7$ and one can check that $(3, 5)$ and $(3, 7)$ are not solutions. Hence we're done. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shendrew7
818 posts
#23
Y by
Our only solution is $\boxed{(3,2)}$. Note that $q=2,3$ is just a finite case check due to size issues, giving us our claimed solution. We now assume $p,q \ge 5$, and suppose $r$ is an arbitrary prime divisor of the denominator, which also must divide the numerator. We then require
\[(p+q)^{p+q} (p-q)^{p-q} \equiv (p+q)^{p-q} (p-q)^{p+q} \equiv 1 \pmod r\]\[\implies \left(\frac{p+q}{p-q}\right)^{2q} \equiv 1 \pmod r \implies k := \operatorname{ord}_r \left(\frac{p+q}{p-q}\right) \mid \gcd(2q,r-1) \mid 2q.\]
First notice $r=2$ and $r=p$ both result in contradictions. Then
\begin{align*}
k=1,2 &\implies (p+q)^2 \equiv (p-q)^2 \pmod r \implies r=q \\
k=q,2q &\implies \gcd(2q,r-1) = q,2q \implies r \equiv 1 \pmod q.
\end{align*}
We finish by using difference of squares on the numerator to get two factors differing by 2 which must both be $0,1 \pmod r$, contradiction. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
megarnie
5718 posts
#24
Y by
The only solution is $(3,2)$, which works. Now we prove everything else fails. Suppose $(p,q)$ isn't $(3,2)$.

Let $a = p+q, b = p-q$. Clearly $b > 1$.

We have $a^b b^a - 1 \mid a^a b^b - 1$. Hence\[a^b b^a - 1 \mid a^a b^b - 1 - (a^b b^a - 1) = a^a b^b - a^b b^a\]Since $a,b$ are relatively prime to $a^b b^a$, we can divide the RHS by $(ab)^b$, so\[ a^b b^a - 1 \mid a^{a-b} - b^{a-b} = a^{2q} - b^{2q}\]Since $a > b$, we have that $a^b b^a - 1 < a^{a-b} - b^{a-b} < a^{a-b}$. Now since $b > 1$, $a^b b^a - 1 > a^b$, so $a^b < a^{a-b}$, meaning $a > 2b$. Hence $p + q > 2p - 2q$, so $p < 3q$.

Case 1: $q >3$. Then $p > q \ge 5$.

Claim: $a^b b^a - 1$ has some prime factor that is not $1\pmod q$.
Proof: Suppose otherwise. Then all divisors of $a^b b^a - 1$ are $1\pmod q$. Then notice that $a,b$ are both even, so $a^b b^a$ is a perfect square. Let $x^2 = a^b b^a$, we have that $(x-1)(x+1) = a^b b^a - 1$, so $x -1$ and $x + 1$ are $1\pmod q$, implying $q = 2$, contradiction. $\square$.

Let $r$ be an odd prime dividing $a^b b^a - 1$ that is not $1\pmod q$. We have $r$ divides $a^{2q} - b^{2q}$, so $\left( \frac ab \right)^{2q} \equiv 1\pmod r$.

Hence the order of $\frac ab$ modulo $r$ divides $2q$. However, it can't be a multiple of $q$ as $q$ doesn't divide $r - 1$. Hence the order of $\frac ab$ modulo $r$ is either $1$ or $2$.

If the order of $\frac ab$ modulo $r$ is $2$, then $r\mid a^2 - b^2 = (a-b)(a+b)$. But $\frac ab \not \equiv 1\pmod r$, so $r$ divides $a + b = 2p$, meaning that $r = p$. We have $a \equiv q\pmod p$ and $b\equiv -q\pmod p$, and both $a,b$ are even, so $a^b b^a \equiv q^b \cdot q^a \equiv q^{2p} \pmod p$, so $q^{2p} \equiv 1\pmod p$. But $q^p \equiv q\pmod p$, so $q^{2p} \equiv q^2 \pmod p$, meaning that $q \in \{-1,1\}\pmod p$. Since $q < p$, this means $q = p - 1$, which is absurd since $ q > 2$. Therefore, the order of $\frac ab$ modulo $r$ must be $1$.

Then $r \mid a - b$, so $r = q$. Hence $a^b  b^a \equiv 1\pmod q$. However, we have $a \equiv b \equiv p \pmod q$, so $p^{a+b} = p^{2p} \equiv 1 \pmod q$. If the order of $p$ modulo $q$ is $p$ or $2p$, we have a contradiction as $p$ cannot divide $q - 1$ (since $p > q$). Since the order of $p$ mod $q$ divides $2p$, it must be $1$ or $2$. Hence $p^2 \equiv 1\pmod q$, so $p\equiv \pm 1 \pmod q$.

Since $q < p < 3q$, $p\in \{q+1, 2q-1, 2q+1, 3q-1\}$. By parity, $p$ can't be $q+1$ or $3q - 1$.

If $p = 2q - 1$, then $a = 3q - 1$, $b = q - 1$, so $(3q - 1)^{q - 1} (q-1)^{3q - 1 } - 1$ divides $(3q - 1)^{2q} - (q-1)^{2q}$.

Hence $(3q-1)^{q-1} \cdot (q-1)^{3q - 1} $ must be less than $(3q-1)^{2q}$, implying that $(q-1)^{3q - 1} < (3q - 1)^{q+1}$.

However, we have\begin{align*}
(3q - 1)^{q+1} < (3q - 3)^{q+1} = 3^{q+1} (q-1)^{q+1}   \\
< (q-1)^{q+1} (q-1)^{q+1} = (q-1)^{2q+2} \\ 
< (q-1)^{3q - 1}, \\
\end{align*}absurd.

Therefore, $p = 2q + 1$. But then $a = 2q + 1, b = q  + 1$, so\[(3q + 1)^{q+1} (q+1)^{3q + 1} - 1 \mid (3q + 1)^{2q} - (q+1)^{2q}\]Hence $(q+1)^{3q + 1} (3q + 1)^{q+1}  < (3q+1)^{2q}$, so $(q+1)^{3q + 1} < (3q + 1)^{q-1}$.

But then\begin{align*}
(3q+1)^{q-1} < (3q+3)^{q-1}  = 3^{q-1} (q+1)^{q-1} \\
< (q + 1)^{2q - 2} < (q+1)^{3q  + 1}, \\
\end{align*}absurd.

Case 2: $q \le 3$.
If $q = 2$, then $p < 3 \cdot 2 = 6$, so $p = 3$ or $ p =5$. To see $p = 5$ does not work, notice it implies $a = 7$ and $b = 3$, and $7^3 \cdot 3^7 - 1$ clearly does not divide $7^4 - 3^4$ (in fact it is much larger). Hence $p = 3$.

If $q = 3$, then $5 < p < 3\cdot 3 = 9$, so $p \in \{5,7\}$. If $p = 5$, then $a = 8, b = 2$, but $8^2 \cdot 2^8 - 1$ doesn't divide $8^6 - 2^6$ (this can be proven by dividing the RHS by $2^6$ and getting a size contradiction). If $p = 7$, then $a  = 10, b =4$, but $10^4 \cdot 4^{10} $ doesn't divide $10^6 - 4^6$ (since $10^4 \cdot 4^10 > 10^6$). Hence $q = 3$ is not possible.





Therefore, we must have $p = 3, q = 2$, so we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AR17296174
39 posts
#25
Y by
Nice problem!
Though really straightforward for N5. Here is my solution!
Attachments:
2017N5.pdf (149kb)
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ilikeminecraft
734 posts
#26
Y by
It suffices to evaluate when $\frac{(p + q)^{2q} - (p - q)^{2q}}{(p + q)^{p - q}(p - q)^{p + q} - 1}$ is integer. Suppose $r$ is a prime such that $r\mid (p + q)^{p - q}(p - q)^{p + q} - 1.$ Hence, $r\mid (p + q)^{2q}-(p - q)^{2q}.$ We obviously require $2q > p - q$ due to size, or $p < 3q.$ We also have the equivalent condition \[\left(\frac{p + q}{p - q}\right)^{2q} \equiv 1\pmod r.\]
We have 3 cases:
\begin{enumerate}
\item $\operatorname{ord}_r\left(\frac{p + q}{p - q}\right) = 1,$ then $\frac{p + q}{p - q} \equiv 1\pmod r,$ so then $2q \equiv 0\pmod r,$ so $r = q.$
\item $\operatorname{ord}_r\left(\frac{p + q}{p - q}\right) = 2,$ then $\frac{p + q}{p - q} \equiv 1\pmod r,$ so then $2p \equiv 0\pmod r,$ so $r = p.$ This implies that $q^2-1\equiv0\pmod p.$ Then, $p = q + 1.$ It isn't hard to verify that $p = 3, q = 2$ is a valid solution.
\item If $q\mid\operatorname{ord}_r\left(\frac{p + q}{p - q}\right),$ then $r\equiv1\pmod q$
\end{enumerate}
Thus, all prime factors of $(p + q)^{p - q}(p - q)^{p + q} - 1$ are exactly $q$ or $1\pmod q.$ However, $((p + q)^{\frac{p - q}{2}}(p - q)^{\frac{p + q}{2}} - 1)((p + q)^{\frac{p - q}{2}}(p - q)^{\frac{p + q}{2}} + 1)$ have distinct values modulo $q$ unless $q = 3.$ It is easy to verify $p = 5, 7$ by hand.
Z K Y
N Quick Reply
G
H
=
a