Join our FREE webinar on May 1st to learn about managing anxiety.

G
Topic
First Poster
Last Poster
k a April Highlights and 2025 AoPS Online Class Information
jlacosta   0
Apr 2, 2025
Spring is in full swing and summer is right around the corner, what are your plans? At AoPS Online our schedule has new classes starting now through July, so be sure to keep your skills sharp and be prepared for the Fall school year! Check out the schedule of upcoming classes below.

WOOT early bird pricing is in effect, don’t miss out! If you took MathWOOT Level 2 last year, no worries, it is all new problems this year! Our Worldwide Online Olympiad Training program is for high school level competitors. AoPS designed these courses to help our top students get the deep focus they need to succeed in their specific competition goals. Check out the details at this link for all our WOOT programs in math, computer science, chemistry, and physics.

Looking for summer camps in math and language arts? Be sure to check out the video-based summer camps offered at the Virtual Campus that are 2- to 4-weeks in duration. 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 events:
[list][*]April 3rd (Webinar), 4pm PT/7:00pm ET, Learning with AoPS: Perspectives from a Parent, Math Camp Instructor, and University Professor
[*]April 8th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS State Discussion
April 9th (Webinar), 4:00pm PT/7:00pm ET, Learn about Video-based Summer Camps at the Virtual Campus
[*]April 10th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MathILy and MathILy-Er Math Jam: Multibackwards Numbers
[*]April 22nd (Webinar), 4:00pm PT/7:00pm ET, Competitive Programming at AoPS (USACO).[/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, 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Apr 2, 2025
0 replies
Construct
Pomegranat   0
3 minutes ago
Source: idk
Let \( p \) be a prime number. Prove that there exists a natural number \( n \) such that
\[
p \mid 2024^n - n.
\]
0 replies
Pomegranat
3 minutes ago
0 replies
inequality problem
pennypc123456789   3
N 27 minutes ago by GeoMorocco
Given $a,b,c$ be positive real numbers . Prove that
$$\frac{ab}{(a+b)^2} +\frac{bc}{(b+c)^2}+\frac{ac}{(a+c)^2} \ge \frac{6abc }{(a+b)(b+c)(a+c)}$$
3 replies
pennypc123456789
Yesterday at 2:42 PM
GeoMorocco
27 minutes ago
China Northern MO 2009 p4 CNMO
parkjungmin   0
30 minutes ago
Source: China Northern MO 2009 p4 CNMO
China Northern MO 2009 p4 CNMO

The problem is too difficult.
Is there anyone who can help me?
0 replies
parkjungmin
30 minutes ago
0 replies
weird Condition
B1t   7
N 31 minutes ago by B1t
Source: Mongolian TST 2025 P4
deleted for a while
7 replies
B1t
Apr 27, 2025
B1t
31 minutes ago
No more topics!
IMO Shortlist 2014 N5
hajimbrak   60
N Apr 25, 2025 by sansgankrsngupta
Find all triples $(p, x, y)$ consisting of a prime number $p$ and two positive integers $x$ and $y$ such that $x^{p -1} + y$ and $x + y^ {p -1}$ are both powers of $p$.

Proposed by Belgium
60 replies
hajimbrak
Jul 11, 2015
sansgankrsngupta
Apr 25, 2025
IMO Shortlist 2014 N5
G H J
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
hajimbrak
209 posts
#1 • 14 Y
Y by ahmedosama, Davi-8191, dalarin01, anantmudgal09, Hypernova, HolyMath, KNM, pog, megarnie, PNT, Adventure10, Mango247, NicoN9, Funcshun840
Find all triples $(p, x, y)$ consisting of a prime number $p$ and two positive integers $x$ and $y$ such that $x^{p -1} + y$ and $x + y^ {p -1}$ are both powers of $p$.

Proposed by Belgium
This post has been edited 3 times. Last edited by hajimbrak, Jul 23, 2015, 10:51 AM
Reason: Added proposer
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
62861
3564 posts
#2 • 14 Y
Y by kaito_shinichi, huyaguero, anantmudgal09, bluephoenix, SAM8, Math-Ninja, AlastorMoody, rashah76, mijail, pog, math31415926535, Adventure10, Mango247, NicoN9
I like this problem!
Solution
This post has been edited 2 times. Last edited by 62861, Jul 16, 2015, 9:08 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.
v_Enhance
6877 posts
#3 • 26 Y
Y by quangminhltv99, randomusername, Devesh14, anantmudgal09, PRO2000, steppewolf, ZzIsaacNewtonZz, MathbugAOPS, yayups, Loppukilpailija, AlastorMoody, Aryan-23, Leia_Skywalker, pog, Kobayashi, HamstPan38825, chystudent1-_-, math31415926535, PNT, ThisNameIsNotAvailable, Kingsbane2139, Adventure10, Mango247, NicoN9, Frank25, Funcshun840
If $p=2$ then any $(x,y)$ with $x+y$ a power of two is okay.

Hence assume $p > 2$. Then if $\nu_p(x) \ge \nu_p(y) > 0$ we get an immediate contradiction, thus we may assume $p \nmid x,y$. So by Fermat's Little Theorem, $x$ and $y$ are $-1 \pmod p$.

It is easy to check that when $p > 2$ we cannot have $x=y$, since otherwise $x(x^{p-2}+1)$ is a power of $p$, which is clearly impossible when $p=2$. Moreover, if $p > 2$ then $x^{p-1}+y \neq y^{p-1}+x$, since otherwise $(x-y)(x^{p-2}+\dots+y^{p-2}) = x-y$, which is impossible unless $x=y$.

Thus, suppose $y^{p-1}+x < x^{p-1}+y$, which is equivalent to $y < x$. Then in particular $y^{p-1}+x$ divides $x^{p-1}+y$, so \[ y^{p-1} + x \mid (-y^{p-1})^p + y \implies y^{p-1}+x \mid y^{p(p-2)}+1. \] By Lifting the Exponent, we thus deduce that \[ \nu_p(y^{p-1}+x) \le 1 + \nu_p(y+1). \] Actually, since LHS is a power of $p$, this informs us that \[ y^{p-1} + x \mid p \cdot (y+1) \implies y^{p-1} + x \le p \cdot (y+1). \] Since $x > y$, this forces \[ y^{p-1} + y \le p \cdot (y+1). \] Also, $y \ge p-1$ since $y \equiv -1 \pmod p$. This can only occur if $y = 2$ and $p = 3$.

So, it remains to find all $x > 2$ such that $x^2+2$ and $4+x$ are powers of $3$. Letting $4+x=3^b$, we find that \[ \left( 3^b-4 \right)^2 + 2 = 3^{2b} - 8 \cdot 3^b + 18 \] is supposed to be a power of $3$, which can only occur for $b \le 1$. Checking, this gives the last solution $(x,y,p) = (5,2,3)$.
This post has been edited 1 time. Last edited by v_Enhance, Jul 11, 2015, 4:35 PM
Reason: Spacing
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
andria
824 posts
#4 • 3 Y
Y by A_Math_Lover, pog, Adventure10
have another solution:
Obviously if $p=2, x+y=2^s$ is a solution if the problem so assume that $p\ge 3$ and let $x^{p-1}+y=p^{\gamma}(1), x+y^{p-1}=p^{\beta}$(2)
Consider two cases:
1) $p\mid x$ then it's obvious that $p\mid y$ let $v_p (x)=r, v_p (y)=t$ then from (1),(2) we get $(p-1)r=t,(p-1)t=r$ which is contradiction for $p\ge 3$ so there isn't any solution in this case.
2) $p\nmid x,y$ note that if $x=y$ then $x^{p-1}+x=p^{\gamma} \longrightarrow p\mid x$ which is a contradiction so without loss of generality assume that $x>y\longrightarrow \gamma>\beta$ note that from (1): $y=p^{\gamma}-x^{p-1}$ substituting this in (2) we get $x+(p^{\gamma}-x^{p-1})^{p-1}=p^{\beta}$(3) now taking this equality modulo $p^{\beta+1}$ we have $x+(p^{\gamma}-x^{p-1})^{p-1}\equiv x+x^{(p-1)^2}\equiv p^{\beta}\pmod{p^{\beta+1}}\longrightarrow v_p (x^{(p-1)^2-1}+1)=\beta$ using lifting exponent lemma we get $\beta=v_p (x^{(p-1)^2-1}+1)=v_p (x+1)+v_p ((p-1)^2-1)=v_p (x+1)+1\longrightarrow v_p (x+1)=\beta-1\longrightarrow x\equiv -1\pmod{p^{\beta-1}}, x=p^{\beta-1}l+1$(4).
Now notice that using (4): $p^{\gamma}-x^{p-1}\equiv -1\pmod{p^{\beta-1}}\longrightarrow p^{\gamma}-x^{p-1}=p^{\beta-1}r-1$ now substituting this in (3) we get $x+(p^{\beta-1}r-1)^{p-1}=p^{\beta}$ but since $p-1\ge 2, r\ge 1, x=p^{\beta-1}l-1$: $p^{\beta}=x+(p^{\beta-1}r-1)^{p-1}\ge (p^{\beta-1}-1)^{p-1}+p^{\beta-1}-1=(p^{\beta-1}-1)(1+(p^{\beta-1}-1)^{p-2})$ from this inquality we immediately get $p=3,\beta=2$ which gives us the solution $(3,5,2)$.
Q.E.D
This post has been edited 1 time. Last edited by andria, Jul 16, 2015, 6:25 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
JackXD
151 posts
#5 • 4 Y
Y by Navi_Makerloff, pog, Adventure10, Mango247
If $p=2$ then any $x+y$ being a power of two will do.Let $p \ge 3$.

Let $x^{p-1}+y=p^k$ and $y^{p-1}+x=p^l$.If $x=y$ then we have $x(x^{p-2}+1)=p^k$ which is not possible because $gcd(x,x^{p-2}+1)=1$.So wlog $x>y$.Then $k>l$.
If $p|x,y$ then let $p^{\alpha}||x,p^{\beta}||y$.Then we must have $\alpha(p-1)=\beta$ and $\beta(p-1)=\alpha$ simultaneously which is not possible.So now we work on the case when $x,y$ are not divisible by $p$.
Let $p^j||x-y$.From the two relations it is easy to see that $x^p-y^p=p^kx-yp^l$.Thus $v_p(p^kx-p^ly)=j+1 \implies l=j+1$.Thus $y^{p-1}+x=p^{j+1} \implies y^{p-1}+y+x-y=p^{j+1} \implies p^j||y^{p-1}+y \implies p^j||y^{p-2}+1=(y+1)(y^{p-3}-y^{p-4}+\cdots+1)$.From $y \equiv -1{\pmod{p}}$ we get that the second factor leaves remainder $p-2$ upon division by $p$.So $p^j||y+1 \implies y \ge p^jl-1$.Thus $p^{j+1}=y^{p-1}+x>y^{p-1} \ge (p^j-1)^{p-1}$.This is not possible for $p>3$.Also for $p=3$ it is possible only for $j=1$.Checking into this possibility we have to have $y^2+x=9$.The only solution in $(x,y)$ satisfying this such that $x^2+y$ is also a power of three is $(2,5)$.

So the solutions are $(2,x,y)$ where $x+y$ is a power of two,$(3,2,5),(3,5,2)$.
This post has been edited 3 times. Last edited by JackXD, Jul 30, 2015, 7:31 PM
Reason: XX
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
juckter
323 posts
#6 • 3 Y
Y by pog, Adventure10, Mango247
If $p = 2$ then $x + y$ a power of two works. Assume $p \geq 3$

Let $x^{p - 1} + y = p^{\alpha}$ and $y^{p - 1} + x = p^{\beta}$. If one of $x, y$ is divisible by $p$ then the other is also divisible by $p$, in this case we have $\upsilon_p(y) = \upsilon_p(x^{p - 1}) = (p - 1)\upsilon_p(x)$ as otherwise $x^{p - 1} + y > p^{\max\{(p - 1)\upsilon_p(x), \upsilon_p(y)\}}$ but this number does not divide $x^{p - 1} + y$. Similarly we have $\upsilon_p(x) = (p - 1)\upsilon_p(y)$, but it is impossible for these two relations to hold as $p > 2$. Hence $x, y$ are not divisible by $p$ and so by FLT they are congruent to $-1 \mod{p}$. Additionally we check that $\alpha \neq \beta$ as otherwise we have $\displaystyle\frac{x^{p - 1} - y^{p - 1}}{x - y} = 1$ which is impossible as $p - 1 > 1$. We also have $x \neq y$ as $x(x^{p - 2} + 1)$ is not a power of $p$ since $p \nmid x$.

Now assume $x > y$ so $\alpha > \beta$. We have $x^p + xy = p^{\alpha}x$ and $y^p + xy = p^{\beta}y$. Substracting gives us $x^p - y^p = p^{\alpha}x - p^{\beta}y$ so that $\upsilon_p(x - y) + 1 = \upsilon_p(x^p - y^p) = \beta$ by LTE. Put $x - y = p^{\beta - 1}k$. Substituting gives us $y^{p - 1} + p^{\beta - 1}k + y = p^{\beta} \implies y(y^{p - 2} + 1) = p^{\beta - 1}(p - k)$. As $p \nmid y$ this implies $p^{\beta - 1} \mid (y^{p - 2} + 1)$. Thus
$$p^{\beta -1}(p - 1) \geq p^{\beta - 1}(p - k) = y(y^{p - 2} + 1) \geq (p - 1)(p^{\beta - 1})$$Where the last equality follows from $p \mid y + 1 \implies y \geq p - 1$. Thus $y = p - 1$, $k = 1$ and $y^{p - 2} + 1 = p^{\beta - 1}$ as all equalities must hold. Thus by LTE $\beta - 1 = \upsilon_p(y^{p - 2} + 1) = \upsilon_p(y + 1) = 1$ as $p - 2$ is odd and $y + 1 = p$. Hence $\beta = 2$. Thus $(p - 1)^{p - 2} + 1 = p$ giving $p = 3$. Finally $y = 2$ and $x = 5$ from $x = p^{\beta - 1}k + y$, which clearly works.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Dukejukem
695 posts
#7 • 2 Y
Y by pog, Adventure10
If $p = 2$, any pair $(x, y)$ with $x + y$ a power of $2$ works. Henceforth, assume that $p \ne 2$ and write $x^{p - 1} + y = p^{\alpha}$ and $x + y^{p - 1} = p^{\beta}$ with WLOG $1 \le \alpha \le \beta.$ Clearly, \[0 \equiv y^{p - 2} \cdot p^{\alpha} - p^{\beta} \equiv x\left[(xy)^{p - 2} - 1\right] \pmod{p^{\alpha}}. \quad (\star)\]If $p \mid xy$, then evidently $p \nmid (xy)^{p - 2} - 1.$ Hence, $(\star)$ forces $x \equiv 0 \pmod{p^{\alpha}}$, which is obviously false for size reasons.

Therefore $p \nmid xy$, so from $(\star)$ we obtain $(xy)^{p - 2} \equiv 1 \pmod{p^{\alpha}}.$ Moreover, Fermat's Little Theorem applied to $x^{p - 1} + y = p^{\alpha}$ and $x + y^{p - 1} = p^{\beta}$ gives $x \equiv y \equiv -1 \pmod{p}.$ Hence, $p \mid xy - 1$, so LTE yields \[\alpha \le \nu_p\left[(xy)^{p - 2} - 1\right] = \nu_p(xy - 1) \implies xy \equiv 1 \pmod{p^{\alpha}}.\]Consequently, \[x^{p} + xy = x \cdot p^{\alpha} \implies x^{p} + 1 \equiv 0 \pmod{p^{\alpha}}.\]Lifting the Exponent, \[\alpha \le \nu_p(x^p + 1) = 1 + \nu_p(x + 1) \implies p^{\alpha} \le p^{1 + \nu_p(x + 1)} \le p(x + 1).\]Substituting $x^{p - 1} + y = p^{\alpha}$, it follows that \[x(x^{p - 2} - p) \le p - y. \quad (\dagger)\]On account of $y \equiv -1 \pmod{p}$, we see that $p - y \le 1.$ Therefore, $x^{p - 2} - p \le 1$, and since $x \equiv -1 \pmod{p}$, this forces $p - 2 = 1$ and $x = p - 1.$ Thus, $p = 3, x = 2$ and so $-2 \le 3 - y$ by $(\dagger).$ Using $y \equiv -1 \pmod{p}$, it remains to check $y \in \{2, 5\}$, which gives the solution $(p, x, y) = (3, 2, 5)$ and its conjugate $(p, x, y) = (3, 5, 2).$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
navi_09220114
478 posts
#8 • 2 Y
Y by pog, Adventure10
If $p=2$, then $x+y$ is power of $2$, then any triplets in form of $(2,x,2^k-x), x<2^k, k\in \mathbb{N}$, are the only solutions. So we assume $p\ge 3$.

Claim 1. $x,y\equiv -1 \pmod p$.

Proof. If $p\mid x$, then $x^{p-1}+y$ is a power of $p$ greater than $p^{p-1}$, so $p^{p-1}\mid x^{p-1}+y \Rightarrow p^{p-1}\mid y$, and so $x+y^{p-1}$ is a power of $p$ greater than $p^{(p-1)^2}$, so $p^{(p-1)^2}\mid x+y^{p-1} \Rightarrow p^{(p-1)^2}|x$, and we can continue this process to get $p^{(p-1)^3}\mid y \Rightarrow p^{(p-1)^4}\mid x \Rightarrow p^{(p-1)^5}\mid y \Rightarrow \cdots $, a contradiction since $p-1 \ge 2$ we have $v_p(x)\ge (p-1)^{2n}$ for all $n$ which tends to infinity for large $n$, which cannot hold. So $p$ does not divides $x$, so as $y$. By Fermat Little Theorem, $x^{p-1}\equiv 1 \pmod p \Rightarrow y\equiv -1\pmod p$. Similarly, $x\equiv -1 \pmod p$.

Claim 2. $p^2$ does not divides $x^{(p-1)^2-2}-x^{(p-1)^2-3}+\cdots +1$.

Proof. By Lifting the Exponent Lemma, since from Claim 1, $p|x+1$, and $p$ does not divides $x$ and $1$, we have $v_p(x^{(p-1)^2-1}+1)= v_p(x+1)+v_p((p-1)^2-1)= v_p(x+1)+1$. Now note that $x^{(p-1)^2-1}+1=(x+1)(x^{(p-1)^2-2}-x^{(p-1)^2-3}+\cdots +1)\Rightarrow v_p(x^{(p-1)^2-1}+1)= v_p(x+1)+v_p(x^{(p-1)^2-2}-x^{(p-1)^2-3}+\cdots +1) \Rightarrow v_p(x^{(p-1)^2-2}-x^{(p-1)^2-3}+\cdots +1)=1$.

Claim 3. $x^{p-1}+y\mid x^{(p-1)^2-1}+1$.

Proof. Suppose $x\le y$, then since $x^{p-1}+y$ and $x+y^{p-1} $ are both distinct powers of $p$, then $x^{p-1}+y\mid x+y^{p-1}$, and since $p$ is odd, $x^{p-1}+y\mid x^{p(p-1)}+y^p$. Together we have $x^{p-1}+y\mid x^{p(p-1)}+y^{p}-y(x+y^{p-1}) \Rightarrow x^{p-1}+y\mid x^{p(p-1)}-xy $. Since $p$ does not divides $x$, $(p,x)=1$, so $ x^{p-1}+y\mid x^{p(p-1)}-xy \Rightarrow  x^{p-1}+y\mid x^{p(p-1)-1}-y \Rightarrow  x^{p-1}+y\mid x^{p(p-1)-1}-y+(x^{p-1}+y) \Rightarrow  x^{p-1}+y\mid x^{p(p-1)-1}+x^{p-1} \Rightarrow x^{p-1}+y\mid x^{(p-1)^2-1}+1$.

Claim 4. $x^{p-1}\le p(x+1)$

Proof. From Claim 3, $x^{p-1}+y\mid x^{(p-1)^2-1}+1=(x+1)(x^{(p-1)^2-2}-x^{(p-1)^2-3}+\cdots +1)$. Since from Claim 2, $p\mid\mid x^{(p-1)^2-2}-x^{(p-1)^2-3}+\cdots +1 $, then we have $x^{p-1}+y\mid (x+1)(x^{(p-1)^2-2}-x^{(p-1)^2-3}+\cdots +1) \Rightarrow x^{p-1}+y\mid p(x+1) \Rightarrow x^{p-1}< p(x+1) $.

Claim 5. The only solutions for odd primes $p$ are $(3,2,5)$ and $(3,5,2)$.

Proof. From Claim 4, $x^{p-1}< p(x+1) \Rightarrow x^{p-1}-px-1< 0$. The derivative of the function $f(x)=x^{p-1}-px+1$ is $(p-1)x^{p-2}-p$, which is greater than $0$ for all $x\ge 2$ and for all $p$. Since $f(2)\ge 0$ for $p\ge 5$, $f(x)< 0$ for $x\ge p-1\ge 2$ has no solutions. So the only case is $p=3$, which we get $x^2< 3(x+1) \Rightarrow x\le 3$, but since $x\equiv -1 \pmod 3$, then $x=2$. Then $4+y, 2+y^2$ is power of $3$, so $$y+4\mid 2+y^2=(y+4)(y-4)+18 \Rightarrow y+4\mid 18$$Since $y+4$ is power of $3$ greater than $4$ and divisor of $18$, we must have $y+4=9 \Rightarrow y=5$. So $(3,2,5)$ is a solution for $x\le y$, and by symmetry, $(3,5,2)$ is also a solution. So the only solutions for odd primes $p$ are $(3,2,5)$ and $(3,5,2)$.

In conclusion, the only solutions are $(2,x,2^k-x), x<2^k, k\in \mathbb{N}$, $(3,2,5)$ and $(3,5,2)$, and these are easily checked to be solutions.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
tenplusten
1000 posts
#9 • 2 Y
Y by pog, Adventure10
LTE and use some inequalitites Which can be proven by İnduction.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
tree3
641 posts
#10 • 3 Y
Y by pog, Adventure10, Mango247
Let's first take the obvious case of $p=2$. We can just take $x=k, y=2^n-k$ where $n$ and $k$ are positive integers. Suppose that $x^{p-1}+y=p^k \leq y^{p-1}+x=p^r$. Then $k \leq r$. Notice that $x^{p-1}+y=p^k$, so we can say $x^{p-1} \equiv -y \mod p^k$. Similarly we get $y^{p-1} \equiv -x \mod p^k$. We can deduce that $x^{(p-1)^2} \equiv -x \mod p$ and since $p$ does not divide $x,y$ for $p>2$, we can deduce that $x^{2p(p-2)} \equiv 1 \mod p^k$. By FLT and the gcd lemma, we can see that $x^{gcd((p-1)p^{k-1},2p(p-2)} \equiv x^{2p} \mod p^k$. For size reasons, we immediately rule out the possibilities of $p^k|x-1,x+1$, so $p^k|x^p-1$ or $p^k|x^p+1$. Notice that FLT on the original equations gives $x,y \equiv -1 \mod p$, so it must be the second case. LTE now gives $k \leq v_p(x+1)+1$, implying $x \geq p^{k-1}-1$. This allows us to see that $x^{p-1}+y \geq x^{p-1}+1 \geq (p^{k-1}-1)^{p-1}+1>p^k$, giving contradiction for all odd primes as long as $k>3$. First we handle $x^{p-1}+y=p$. We get that $x<2$, implying $x+1=2$, contradiction. Now consider $x^{p-1}+y=p^2$. We can see that $x$ must be no more than $3$ for $p \geq 3$, implying that $x+1=2,3,4$, only the middle of which is divisible by an odd prime. Similarly $x^{p-1}+y=p^3$, implying that $x \leq 5$, implying that $x+1=2,3,4,5,6$, only $3$ and $5$ of which are odd. However $5$ fails because $4^{p-1}>p^3$ for $p>3$ and $(4,11)$ fails. Thus $p=3$. So $x^2+y$ and $y^2+x$ are both powers of $3$. $x^2+y$ must then equal $9,27$. From here, we can easily get the only other solution to be $x=2, y=5$. Thus all solutions are in the forms $(2,x,y)$ where $x+y$ is a power of two,$(3,2,5),(3,5,2)$.
This post has been edited 7 times. Last edited by tree3, Oct 3, 2019, 5:25 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Superguy
354 posts
#11 • 3 Y
Y by AlastorMoody, pog, Adventure10
Solution

$\boxed{Claim-1}$

$\boxed{p\mid x \implies no solution}$

Proof::if $p\mid x$ then $p\mid y$
but we can see that $v_p({x^{p-1}})=v_p({y})$ and $v_p({y^{p-1}})=v_p({x})$ which is absurd.$\square$

$\boxed{Claim-2}$

$\boxed{p\nmid x\implies p=2,3 }$

Proof :we assume W.L.O.G $y>x$ and $p\geq 3$
Denote $x^{p-1}+y=p^k$,$y^{p-1}+x=p^l$
$x^{p-1}+y\equiv 1+y\pmod{p}$
$y^{p-1}+x\equiv 1+x\pmod{p}$
Now as $y>x$
$x^{p-1}+y \mid y^{p-1}+x$
$$\implies x^{p-1}+y \mid x^{p-2}y^{p-1}+x^{p-1}$$$$\implies x^{p-1}+y \mid x^{p-2}y^{p-1}+x^{p-1}-(x^{p-1}+y)$$$$\implies x^{p-1}+y \mid (xy)^{p-2}-1$$By F.L.T,$(xy)^{p^{k-1}.(p-1)}\equiv 1\pmod {p^k}$
$(p^{k-1}.(p-1),(p-2))=1$ for$p\geq 3$
$\implies (xy)\equiv 1\pmod {p^k}$
$$\implies x^p+xy\equiv 0\pmod {p^k}$$$$\implies x^p\equiv -1\pmod {p^k}$$Lifting the exponent ,
$$v_p({x^{2p}-1})=v_p({x+1})+1$$$$\implies p(x+1)\geq x^{p-1}+y$$Case-1
Case-2
THUS our claims are proved and Now we are left with case $p=2$
we have infinite solutions with $x+y=2^k$$\blacksquare$
$Q.E.D$
This post has been edited 1 time. Last edited by Superguy, Apr 10, 2018, 8:40 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ayan.nmath
643 posts
#12 • 3 Y
Y by pog, Adventure10, Mango247
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
yayups
1614 posts
#13 • 3 Y
Y by AlastorMoody, pog, Adventure10
Bashy solution:

The solutions are $p=2$ and any $x,y$ with $x+y$ is a power of $2$, and the solution $(p=5,\{x,y\}=\{2,5\})$. It is easy to check that these work. Firstly, if $p=2$, then we must have $x+y$ is a power of $2$, and we have that solution. From now on, we assume $p\ge 3$.

Claim 1: If $p\nmid x,y$.
Proof of Claim 1: Suppose $p^k\mid x,y$ with $k\ge 1$, and furthermore suppose this is the largest $k$ with the previous properties. Let $x=p^ka$ and $y=p^kb$. Then,
\[p^r=x^{p-1}+y=(p^ka)^{p-1}+p^kb.\]Firstly, note that $r>k(p-1)$. Note that $k(p-1)\ge 2k>k$, so taking mod $p^{k(p-1)}$, we have that
\[p^{k(p-1)}\mid p^k b,\]so in particular, $p\mid b$. We can very similarly show that $p\mid a$, so we have $p^{k+1}\mid x,y$, which is the desired contradiction. $\blacksquare$

Note by Fermat's little theorem, we must have that $y+1,x+1\equiv 0\pmod{p}$. Let $x=p^ka-1$ and $y=p^kb-1$ where $k\ge 1$, and is again the greatest $k$ with given properties.

Claim 2: Unless $p=3$ and $k=1$ and $(a=1\text{ or }b=1)$, we have that $x^{p-1}+y,y^{p-1}+x> p^{k+1}$.
Proof of Claim 2: Suppose $x^{p-1}+y\le p^{k+1}$. Therefore, $x^{p-1}<p^{k+1}$, so
\[(p^k a-1)^{p-1}<p^{k+1}.\]If $a\ge 2$, then
\[(p^ka-1)^{p-1}\ge p^{k(p-1)}\ge p^{2k}\ge p^{k+1},\]which is a contradiction. Therefore, $a=1$, so
\[(p^k-1)^{p-1}<p^{k+1}.\]If $k\ge 3$, then
\[(p^k-1)^{p-1}\ge p^{2(k-1)}\ge p^{k+1},\]which is a contradiction, so $k\le 2$. If $k=2$, then we have
\[(p^2-1)^{p-1}\ge (p^2-1)^2,\]and it is easy to see that for $p\ge 3$, we have $(p^2-1)^2\ge p^3$, so there is a contradiction. Thus, $k=1$, so
\[(p-1)^{p-1}<p^2.\]It is easy to see that the only solution for $p\ge 3$ is $p=3$, so we must have $p=3$. Therefore, in this case $p=3,k=1,a=1$. In the case $y^{p-1}+x<p^{k+1}$, we have $p=3,k=1,b=1$, so the claim is proved. $\blacksquare$

We will revisit the case $p=3,k=1,(a=1\text{ or }b=1)$ later, so for now assume that $x^{p-1}+y,y^{p-1}+x\ge p^{k+1}$. We see that for $r\ge k+2$, we have that
\[p^r=(p^ka-1)^{p-1}+(p^kb-1)=p^k(a+b)+ap^{k+1}\left[-1+a\binom{p-1}{2}p^{k-1}\right]+p^{k+2}(\text{other integer terms}).\]Therefore, taking mod $p^{k+1}$, we see that $p\mid a+b$, and taking mod $p^{k+2}$, we have that
\[a\left[-1+a\binom{p-1}{2}p^{k-1}\right]\equiv -\frac{a+b}{p}\pmod{p}.\]Doing the same for $y^{p-1}+x$, we see that
\[a\left[-1+a\binom{p-1}{2}p^{k-1}\right]\equiv b\left[-1+b\binom{p-1}{2}p^{k-1}\right]\pmod{p}.\]If $k=1$, then $a(a-1)\equiv b(b-1)\pmod{p}$, so $a^2-b^2\equiv b-a\pmod{p}$, so $a\equiv b\pmod{p}$. Combined with $p\mid a+b$, this means that $p\mid a,b$. If $k\ge 2$, then this simply says that $-a\equiv -b\pmod{p}$, so again $p\mid a,b$. However, this violates the maximality of $k$, which is a contradiction.

Therefore, we must have that $p=3,k=1$, and WLOG $a=1$. Therefore, $x=2$ and $y=3b-1$. Thus, $2^2+(3b-1)=3(b+1)$ is a power of $3$, so $b+1$ is a power of $3$. Let $b=3^h-1$. We also have that $(3b-1)^2+2$ is a power of $3$, or that $9b^2-6b+3=3(3b^2-2b+1)$ is, so $3b^2-2b+1$ is a power of $3$. Therefore,
\[3(3^h-1)^2-2(3^h-1)+1=3^{2h+1}-2\cdot 3^{h+1}+3-2\cdot 3^h+2+1\]is a power of $3$. If $h\ge 2$, then taking mod $9$ is a contradiction, so we must have $h=1$, so $b=2$. Therefore, $x=2,y=5,p=3$, which is the only other claimed solution. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math_pi_rate
1218 posts
#14 • 7 Y
Y by AlastorMoody, Aryan-23, GammaBetaAlpha, pog, Zaro23, Adventure10, Mango247
ANSWER: The answers are $(p,x,y)=(2,x,2^z-x) \text{ or } (3,2,5) \text{ or } (3,5,2)$. It's easy to see that this works.

SOLUTION: The case $p=2$ easily gives the first set of answers. So from now on assume that $p$ is an odd prime. Let $$x^{p-1}+y=p^m \text{ and } x+y^{p-1}=p^n \text{ where } m,n \in \mathbb{N}$$It's easy to see that $x=y$ gives no solutions, cause then $x(x^{p-2}+1)$ is a power of $p$, which is not possible for $p>2$ (as $x(x^{p-2}+1)$ must be an even integer). So WLOG assume that $x>y$, which also gives $m>n$. Our solution uses the following important claim-

CLAIM| The integers $x$ and $y$ are of the form $x=ap^{n-1}-1$ and $y=bp^{n-1}-1$ for some positive integers $a$ and $b$ such that $p \nmid a,b$.

Proof of Claim Our proof to this claim is divided into three parts as given below.
  • We first show that $p \nmid x,y$. Suppose, to the contrary, that $p \mid x$. Then $p \mid y$ must also hold true. WLOG take $\nu_p(x) \geq \nu_p(y)$. Then this means that $\nu_p(x^{p-1})>\nu_p(y)$, and so we get that $\nu_p(x^{p-1}+y)=\nu_p(y)$, or equivalently that $\nu_p(y)=m$. However, $p^m=x^{p-1}+y>y \Rightarrow m>\nu_p(y)$, and so we arrive at a contradiction. Thus, we must have that $p \nmid x,y$.
    $\text{ }$
  • Now we will show that $\nu_p(x+1)=\nu_p(y+1)>0$. Note that, as $p \nmid x,y$, so by FLT, we have $0 \equiv x^{p-1}+y \equiv 1+y \pmod{p}$, and so $p \mid y+1$. In a similar fashion, we get that $p \mid x+1$. Again (for brevity) take $\nu_p(x+1)=r$ and $\nu_p(y+1)=s$. Then we wish to prove that $r=s$. So let us assume to the contrary that $r \neq s$. Now, by Lifting The Exponent Lemma, we have $$\nu_p(x^{p-1}+x)=\nu_p(x)+\nu_p(x^{p-2}+1)=0+\nu_p(x+1)+\nu_p(p-2)=r$$Similarly, we get that $\nu_p(y^{p-1}+y)=s$. Then, using our assumption (i.e. $r \neq s$), we have $$\nu_p(p^m+p^n)=\nu_p((x^{p-1}+x)+(y^{p-1}+y)) \Rightarrow \min(r,s)=n$$
    1. If $r=n$, then $x+1=kp^n \Rightarrow x+1=k(x+y^{p-1})$, which is not possible unless $y=k=1$. But then $$p^m=x^{p-1}+y=(p^n-1)^{p-1}+1 \Rightarrow 0 \equiv (p^n-1)^{p-1}+1 \equiv 2 \pmod{p} \rightarrow \text{CONTRADICTION}$$
    2. If $s=n$, then $y+1=kp^n \Rightarrow y+1=k(x+y^{p-1})$, which is not possible because $x>y$.

    Thus, we arrive at a contradiction in both the cases, and so we must have $r=s$.
    $\text{ }$
  • Take $\nu_p(x+1)=\nu_p(y+1)=e$, i.e. $x+1=ap^e$ and $y+1=bp^e$, where $\nu_p(a)=\nu_p(b)=0$. We wish to show that $e=n-1$. Note that $p^e \leq x+1<x+y^{p-1}=p^n$, and so we must have $e<n$. As $n<m$, so we have $e<n<m$. Then we get that $$p^m=x^{p-1}+y=(ap^e-1)^{p-1}+(bp^e-1)=(1-a(p-1)p^e+ \dots +(ap^e)^{p-1})+(bp^e-1)=p^e(b-a(p-1)+wp^e)$$where $w$ is a positive integer. As $m>e>0$, this gives that $$a+b-ap+wp^e=p^{m-e} \Rightarrow p \mid a+b$$Now, notice that $p \nmid a-b$, since otherwise $p \mid (a-b)+(a+b) \Rightarrow p \mid 2a$, which is not possible as $\nu_p(2)=\nu_p(a)=0$. So this means that $\nu_p(x-y)=\nu_p(p^e(a-b))=e$. Then, by LTE, we have that $$\nu_p(x^p-y^p)=\nu_p(x-y)+\nu_p(p)=e+1$$But, using our original equations, we get $$x^p-y^p=x(x^{p-1}+y)-y(x+y^{p-1})=xp^m-yp^n=p^n(xp^{m-n}-y) \Rightarrow p^n \mid x^p-y^p$$$$\Rightarrow n \mid \nu_p(x^p-y^p) \Rightarrow n \mid e+1 \Rightarrow n \leq e+1 \Rightarrow \text{As } e<n \text{, so we must have } e=n-1 \text{.}$$
Summarizing our three steps, we get that $x=ap^{n-1}-1$ and $y=bp^{n-1}-1$.
Return to the problem at hand. Note that our Lemma gives that $x,y \geq p^{n-1}-1$. Also, $n \geq 2$, since otherwise $p \nmid x+1,y+1$. Now, with a bit of brute force calculations (I'll probably write them down later), one can easily show that this inequality is not true for $p \geq 5$ and $n \geq 3$ (For the diligent reader, try proving this by contradiction). So we get that $p=3$ and $n=2$. This gives $x=3a-1$ and $y=3b-1$. Thus, we have $$x+y^2=3^2 \Rightarrow 9b^2-6b+3a=9 \Rightarrow b<2 \Rightarrow b=1,a=2 \Rightarrow x=5,y=2 \text{ } \blacksquare$$
This post has been edited 2 times. Last edited by math_pi_rate, Dec 28, 2018, 7:25 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Wizard_32
1566 posts
#15 • 4 Y
Y by Aryan-23, pog, Adventure10, Funcshun840
Really nice, but surprisingly easy for a N5.
hajimbrak wrote:
Find all triples $(p, x, y)$ consisting of a prime number $p$ and two positive integers $x$ and $y$ such that $x^{p -1} + y$ and $x + y^ {p -1}$ are both powers of $p$.

Proposed by Belgium
We claim that the only solutions are $(p,x,y)=(3,2,5),(3,5,2),(2,n,2^n-1),$ $(2,2^n-1,n).$ These clearly work. Now we prove these are the only ones. Assume that
$$x^{p-1}+y=p^k, \qquad y^{p-1}+x=p^\ell$$where $x<y$ and $k<\ell.$ Treat with the case $p=2$ seperately.

Claim: We have $\nu_p(y-x) \ge k-1.$
Proof: Firstly, by Fermat $x \equiv -1 \equiv y \pmod{p}$ and so $p \nmid x,y$ and $p \mid y-x.$ We have
$$x^{p-1}+y \mid y^{p}+xy-x(x^{p-1}+y)=y^p-x^p$$So by LTE $\nu_p(x-y)+1 \ge k.$
Suppose $k>2.$

Claim: We have $x \equiv -1 \pmod{p^2}.$
Proof: Since $k>2,$ hence $p^2 \mid x-y$ and hence
$$0 \equiv p^k=x^{p-1}+y \equiv x^{p-1}+x \pmod{p^2}$$Thus $x^p \equiv -x^2 \pmod{p^2}.$ (notice that $\gcd(x,p)=1$ so this is all valid).

But also, by Euler we have $x^{p(p-1)} \equiv 1 \pmod{p^2}$ and thus
\begin{align*}
    -x \equiv y^{p-1} \equiv \left( -x^{p-1} \right)^{p-1} \equiv x^{(p-1)^2} \pmod{p^2} \\
   \implies x^{p^2-2p} \equiv -1 \overset{\text{Euler}}{\equiv} -x^{p^2-p} \implies x^{p} \equiv -1 \pmod{p^2}
\end{align*}So, $-1 \equiv x^p \equiv -x^2$ and so $x^2 \equiv 1 \pmod{p^2}.$ Write $x=pm-1$ for some $m>0.$ Then $1 \equiv (pm-1)^2 \equiv 2pm+1$ and so $m \equiv 0 \pmod{p}.$ So $x \equiv -1 \pmod{p^2},$ as desired. $\square$
Now, we get
$$x^{p-1}+y \mid p(x-y)+p(x^{p-1}+y)=px(x^{p-2}+1)$$Now, clearly $\gcd(x,y)=1$ else we must have $\gcd(x,y)=p^z$ but then $p^k=x^{p-1}+y=p^z(\alpha),$ where $\gcd(\alpha,p)=1$ and $\alpha>1,$ which is not possible. Hence, we get $x^{p-1}+y \mid p(x^{p-2}+1)$ and so $x^{p-2}(x-p)+y \le p.$ If $x>p \ge 3,$ then this gives $x^{p-2}<p.$ This is impossible since $p>x^{p-2} \ge x>p.$

Thus, $x \le p$ and so $x=p-1.$ Thus the second claim gives $p-1 \equiv -1 \pmod{p^2}$ which is impossible.

Thus, $k=2$ which gives $p=x^{p-1}+y > (p-1)^{p-1}$ and so $p=3.$ Then $x=3-1=2$ and so $y=5,$ and we get the solution, and we are done. $\blacksquare$
This post has been edited 1 time. Last edited by Wizard_32, Oct 28, 2019, 5:34 PM
Z K Y
G
H
=
a