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

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

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

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

Be sure to mark your calendars for the following events:
[list][*]March 5th (Wednesday), 4:30pm PT/7:30pm ET, HCSSiM Math Jam 2025. Amber Verser, Assistant Director of the Hampshire College Summer Studies in Mathematics, will host an information session about HCSSiM, a summer program for high school students.
[*]March 6th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar on Math Competitions from elementary through high school. Join us for an enlightening session that demystifies the world of math competitions and helps you make informed decisions about your contest journey.
[*]March 11th (Tuesday), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS Chapter Discussion MATH JAM. AoPS instructors will discuss some of their favorite problems from the MATHCOUNTS Chapter Competition. All are welcome!
[*]March 13th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar about Summer Camps at the Virtual Campus. Transform your summer into an unforgettable learning adventure! From elementary through high school, we offer dynamic summer camps featuring topics in mathematics, language arts, and competition preparation - all designed to fit your schedule and ignite your passion for learning.[/list]
Our full course list for upcoming classes is below:
All classes run 7:30pm-8:45pm ET/4:30pm - 5:45pm PT unless otherwise noted.

Introductory: Grades 5-10

Prealgebra 1 Self-Paced

Prealgebra 1
Sunday, Mar 2 - Jun 22
Friday, Mar 28 - Jul 18
Sunday, Apr 13 - Aug 10
Tuesday, May 13 - Aug 26
Thursday, May 29 - Sep 11
Sunday, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
Wednesday, Jul 16 - Oct 29

Prealgebra 2 Self-Paced

Prealgebra 2
Tuesday, Mar 25 - Jul 8
Sunday, Apr 13 - Aug 10
Wednesday, May 7 - Aug 20
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21


Introduction to Algebra A Self-Paced

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

Introduction to Counting & Probability Self-Paced

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

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

Introduction to Algebra B Self-Paced

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

Introduction to Geometry
Tuesday, Mar 4 - Aug 12
Sunday, Mar 23 - Sep 21
Wednesday, Apr 23 - Oct 1
Sunday, May 11 - Nov 9
Tuesday, May 20 - Oct 28
Monday, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
Monday, Jul 14 - Jan 19

Intermediate: Grades 8-12

Intermediate Algebra
Sunday, Mar 16 - Sep 14
Tuesday, Mar 25 - Sep 2
Monday, Apr 21 - Oct 13
Sunday, Jun 1 - Nov 23
Tuesday, Jun 10 - Nov 18
Wednesday, Jun 25 - Dec 10
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22

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

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

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

Advanced: Grades 9-12

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

Calculus
Sunday, Mar 30 - Oct 5
Tuesday, May 27 - Nov 11
Wednesday, Jun 25 - Dec 17

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

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

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

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

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

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

AMC 12 Final Fives
Sunday, May 18 - Jun 15

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

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


MathWOOT Level 1
MathWOOT Level 2
ChemWOOT
CodeWOOT
PhysicsWOOT

Programming

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

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

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

Physics

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

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

Relativity
Sat & Sun, Apr 26 - Apr 27 (4:00 - 7:00 pm ET/1:00 - 4:00pm PT)
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
Mar 2, 2025
0 replies
Inequality => square
Rushil   12
N 7 minutes ago by ohiorizzler1434
Source: INMO 1998 Problem 4
Suppose $ABCD$ is a cyclic quadrilateral inscribed in a circle of radius one unit. If $AB \cdot BC \cdot CD \cdot DA \geq 4$, prove that $ABCD$ is a square.
12 replies
+1 w
Rushil
Oct 7, 2005
ohiorizzler1434
7 minutes ago
p + q + r + s = 9 and p^2 + q^2 + r^2 + s^2 = 21
who   28
N 24 minutes ago by asdf334
Source: IMO Shortlist 2005 problem A3
Four real numbers $ p$, $ q$, $ r$, $ s$ satisfy $ p+q+r+s = 9$ and $ p^{2}+q^{2}+r^{2}+s^{2}= 21$. Prove that there exists a permutation $ \left(a,b,c,d\right)$ of $ \left(p,q,r,s\right)$ such that $ ab-cd \geq 2$.
28 replies
who
Jul 8, 2006
asdf334
24 minutes ago
H not needed
dchenmathcounts   44
N an hour ago by Ilikeminecraft
Source: USEMO 2019/1
Let $ABCD$ be a cyclic quadrilateral. A circle centered at $O$ passes through $B$ and $D$ and meets lines $BA$ and $BC$ again at points $E$ and $F$ (distinct from $A,B,C$). Let $H$ denote the orthocenter of triangle $DEF.$ Prove that if lines $AC,$ $DO,$ $EF$ are concurrent, then triangle $ABC$ and $EHF$ are similar.

Robin Son
44 replies
dchenmathcounts
May 23, 2020
Ilikeminecraft
an hour ago
IZHO 2017 Functional equations
user01   51
N an hour ago by lksb
Source: IZHO 2017 Day 1 Problem 2
Find all functions $f:R \rightarrow R$ such that $$(x+y^2)f(yf(x))=xyf(y^2+f(x))$$, where $x,y \in \mathbb{R}$
51 replies
user01
Jan 14, 2017
lksb
an hour ago
No more topics!
IMO ShortList 1999, number theory problem 1
orl   60
N Feb 18, 2025 by smileapple
Source: IMO ShortList 1999, number theory problem 1
Find all the pairs of positive integers $(x,p)$ such that p is a prime, $x \leq 2p$ and $x^{p-1}$ is a divisor of $ (p-1)^{x}+1$.
60 replies
orl
Nov 13, 2004
smileapple
Feb 18, 2025
IMO ShortList 1999, number theory problem 1
G H J
Source: IMO ShortList 1999, number theory problem 1
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
orl
3647 posts
#1 • 7 Y
Y by ahmedosama, Davi-8191, Adventure10, megarnie, HWenslawski, Mango247, cubres
Find all the pairs of positive integers $(x,p)$ such that p is a prime, $x \leq 2p$ and $x^{p-1}$ is a divisor of $ (p-1)^{x}+1$.
Attachments:
This post has been edited 2 times. Last edited by orl, Nov 14, 2004, 10:16 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
grobber
7849 posts
#2 • 11 Y
Y by feridverdiyev, alreva99, Adventure10, megarnie, ngocthinht1k10ltt, Vladimir_Djurica, Mai-san, Mango247, Stuffybear, cubres, and 1 other user
First of all, if $p=2$, then $x$ is $1$ or $2$. Assume now $p\ge 3$.

Clearly, $x$ must be odd (let's say that $x=2k+1$), and let's assume $x>1$. Let $q$ be the smallest prime divisor of $x$. We have $q|((p-1)^2x-1,(p-1)^{q-1}-1)=(p-1)^2-1=p(p-2)$. Assume $q\ne p$. We find that $q|p-2$. At the same time, we have $q|(p-1)^x+1=(p-1)^{2k+1}+1=[(p-1)^{2k}-1](p-1)+p$, so $q|p$, which contradicts the fact that $q|p-2$ and $q$ is odd. This means that $q=p$, so $x\in\{p,2p\}$, and since it's odd, we have $x=p$.

We now have to find those odd primes $p$ s.t. $p^{p-1}|(p-1)^p+1$. After expanding the binomial on the right, we find that the expression on the right is $p^2+kp^3$, so $p-1\le 2$, meaning that the only odd prime satisfying this is $p=3$ (it it does satisfy the relation, since $3^2|2^3+1$). The solutions are then $(1,p)$ for any prime $p$, $(2,2)$ and $(3,3)$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
orl
3647 posts
#3 • 3 Y
Y by Adventure10, Mango247, cubres
OFFICIAL SOLUTION

Clearly we have the solutions $(1,p)$ and $(2,2)$, and for every other solution $p \geq 3$. It remains to find the solutions $(x,p)$ with $x \geq 2$ and $p \geq 3$. We claim that in this case $x$ is divisible by p and $x y 2p$, whence $x = p$. This will lead to

\[p^{p-1}|(p-1)^{p}+1=p^{2}\left(p^{p-2}-{p \choose 1}p^{p-3}+
\cdots + -{p \choose p-3}p-{p \choose p-2}+1\right)\]

therefore, because all the terms in the brackets excepting the last one is divisible by $p$,$p-1 \leq 2$. This leaves only $p=3$ and $x=3$. Let us prove now the claim. Since $(p-1)^{x}+1$ is odd, so is $x$ (therefore $x < 2p$). Denote by q the smallest prime divisor of $x$. $q|(p-1)^{x}+1$ we get $(p-1)^{x} \equiv -1 \pmod {q}$ and $(q,p-q)=1$. But $(x,p-q)=1$ (from the choice of q) leads to the existence of integers $u,v$ such that $ux+v(q-1)=1$, whence $p-1 \equiv (p-1)^{ux}$. $(p-1)^{v(q-1)} \equiv (-1)^{u} \cdot 1^{v} \equiv -1 \pmod {q}$, because $u$ must be odd. This shows that $q|p$, therefore $q=p$. In conclusion the required solutions are $(2,2), (3,3)$ and $(1,p)$, where $p$ is an arbitrary prime.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Davron
484 posts
#4 • 3 Y
Y by Adventure10, Mango247, cubres
@all : can you please explain :-)

$q|[(p-1)^2x-1,(p-1)^{q-1}-1)=(p-1)^2-1$

Sincerely Davron
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
marko avila
521 posts
#5 • 5 Y
Y by Adventure10, Mango247, Mango247, Mango247, cubres
grobber wrote:
At the same time, we have $q|(p-1)^{x}+1=(p-1)^{2k+1}+1=[(p-1)^{2k}-1](p-1)+p$, so $q|p$, which contradicts the fact that $q|p-2$ and $q$ is odd.
i dont get this why does q divide p. please someone explain.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mathias_DK
1312 posts
#6 • 2 Y
Y by Adventure10, cubres
orl wrote:
Find all the pairs of positive integers $ (x,p)$ such that p is a prime, $ x \leq 2p$ and $ x^{p - 1}$ is a divisor of $ (p - 1)^{x} + 1$.
First the case where $ p=2$: $ x \mid 2$. So there are solutions $ (p,x) = (2,1)$ and $ (p,x) = (2,2)$.
Then the case where $ x=1$. (I will use that $ x$ has prime divisors later) $ 1^{p-1} \mid (p-1)^1 + 1 \iff 1 \mid p$ always holds. So $ (1,p)$ are also solutions.
$ x^{p-1} \mid (p-1)^x + 1 \mid (p-1)^{2x} - 1$. Let $ q$ be the smallest primedivisor of $ x$. Then $ (p-1)^{2x} \equiv 1 \bmod q \Rightarrow (p-1)^{(2x,q-1)} \equiv 1 \bmod q$. But $ (2x,q-1) \le 2(x,q-1) = 2$. So $ q \mid (p-1)^2-1 = p(p-2)$.
If $ q \mid p$ then $ q=p$. Since $ x$ is odd and $ x \leq 2p$ we see that $ x=p > 2$. Then $ p^{p-1} \mid (p-1)^p + 1 = (p-1)^p - (-1)^p$
It is well known that $ v_p(a^n-b^n) = v_p(n) + v_p(a-b)$ when $ a \equiv b \bmod p$ and $ (ab,p)=1$.
Hence $ v_p( (p-1)^p - (-1)^p ) = v_p(p) + v_p(p-1-(-1))=2$. Hence $ p-1 \le 2$. And then $ p=3$ gives the solution $ (x,p)=(3,3)$.
Now assume that $ q \mid p-2$. Then $ q^{p-1} \mid (p-1)^{2x} - 1^{2x}$.
So $ v_q( (p-q)^{2x} - 1^{2x} ) = v_q(p-2) + v_q(2x) \ge p-1$.
But since $ q$ is odd: $ v_q(2x) = v_q(x)$. And $ q \ge 3$. Hence $ v_q(n) \le log_3(n)$ when $ n \in \mathbb{N}$. So:
$ log_3(p-2) + log_3(x) \ge p-1$.
$ x \le 2p$: $ log_3(p-2) + log_3(2p) \ge p-1 \iff 2p^2-4p \ge 3^{p-1}$
Let $ f(p) = 3^{p} - 2(p+1)^2+4(p+1) = 3^p - 2p^2+2$. Then $ f(p-1) \le 0$.
$ f'(p) = \ln (3) \cdot 3^p -4p$ and $ f''(p) = \ln^2(3) \cdot 3^p > 0$
But $ f'(2) = \ln (3) \cdot 3^2 - 4 \cdot 2 > 3^2 - 4 \cdot 2 = 1 > 0$. Since $ f''(p) > 0$ we see that $ f(p)$ is increasing when $ p \ge 2$. But $ f(2) = 3^2-2\cdot2^2+2 = 3 > 0$
Hence: When $ p \ge 3$ we see that $ f(p) > 0$. So $ q \mid p-2$ doesn't give any solutions. QED

Click to reveal hidden text
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ropro01
62 posts
#7 • 3 Y
Y by navi_09220114, Adventure10, cubres
Setting $n=1$ we get the solutions $(1,p)$ with $p$ prime. For $p\in\{2,3\}$ we find that $(2,2)$ and $(3,3)$ are solutions too. Now let $n>1$ and $p>3$, then $n$ has to be odd.

Case 1. $n$ is a prime power, so write $n=q^\alpha$. Then we get $(p-1)^{q^\alpha}\equiv -1 \mod q \Leftrightarrow p\equiv 0 \mod q \Leftrightarrow p=q$, implying that $\alpha=1$. Now $(p-1)^p+1=\sum_{i=0}^p \binom{p}{i} p^i (-1)^{p-i}+1\equiv \sum_{i=3}^{p-2} \binom{p}{i}p^i (-1)^{p-i} - \frac{p-1}{2} p^3+p^2 \equiv 0 \mod p^{p-1}$
and as the LHS is divisible by $p^2$ but not by $p^3$, the congruence cannot hold, so there are no solutions.

Case 2. $n$ has at least two distinct prime factors. Let $q$ be the smallest prime divisor of $n$, then $n=a\cdot q^\alpha$ with $\gcd(q,a)=1$ and $a\ge 3$, so $3q^\alpha<2p$. Now we have $(p-1)^{aq^\alpha}\equiv -1 \mod q^{\alpha(p-1)}$. Squaring, we get $(p-1)^{2aq^\alpha}\equiv 1 \mod q^{\alpha(p-1)}$. As $ord_{q^{\alpha(p-1)}}(p-1)|\gcd\left(2aq^\alpha,\varphi\left(q^{\alpha(p-1)}\right)\right)=\gcd\left(2aq^\alpha,(q-1)q^{\alpha(p-1)-1}\right)=2q^\alpha$ we also have $(p-1)^{2q^\alpha}\equiv 1 \mod q^{\alpha(p-1)}\Leftrightarrow\left((p-1)^{q^\alpha}-1\right)\left((p-1)^{q^\alpha}+1\right)\equiv 0 \mod q^{\alpha(p-1)}$.
As $gcd\left((p-1)^{q^\alpha}-1,(p-1)^{q^\alpha}+1\right)=1$ we get $(p-1)^{q^\alpha}\equiv \pm 1 \mod q^{\alpha(p-1)}$. If $(p-1)^{q^\alpha}\equiv 1 \mod q^{\alpha(p-1)}$ it follows that $(p-1)^{aq^\alpha}\equiv 1 \equiv -1 \mod q^{\alpha(p-1)}$, a contradiction. But now $q^{\alpha(p-1)}|(p-1)^{q^\alpha}+1$. We know from Catalan's conjecture that equality cannot hold here, further $(q^\alpha)^{p-1}>(p-1)^{q^\alpha}\Leftrightarrow\frac{\ln(q^\alpha)}{q^\alpha}>\frac{\ln(p-1)}{p-1}$ which is clearly true, as $f'(x)= \left(\frac{\ln(x)}{x}\right)'=\frac{1-\ln(x)}{x^2}$, so $f(x)$ is strictly decreasing for $x>e$. We conclude that there are no more solutions.

Hence, $(1,p),(2,2),(3,3)$ are the only solutions. $\square$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
trigonometry456103
349 posts
#8 • 3 Y
Y by Adventure10, Mango247, cubres
Here is my solution(not exactly written up in the most organized way):
Click to reveal hidden text
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
frill
316 posts
#9 • 5 Y
Y by Minkowsi47, Adventure10, Mango247, endless_abyss, cubres
Once the cases $x=1$ and $p\mid x$ have been dealt with using, for example, LTE (giving solutions of $\left(1,p\right),\left(2,2\right)$ and $\left(3,3\right)$) and it has been noted that $x$ is otherwise odd, another way to finish it off is to use orders:

$x^{p-1}\mid\left(p-1\right)^{x}+1\mid\left(p-1\right)^{2x}-1$. Thus if $q$ is the smallest a prime divisor of $x$ (the case $x=1$ has already been dealt with) then we have that $q\mid\left(p-1\right)^{x}+1\Rightarrow q\nmid\left(p-1\right)^{x}-1$ ($x$ is odd means $q\neq2$) and $q\mid\left(p-1\right)^{2x}-1$. Thus $\text{ord}_{q}\left(p-1\right)\nmid x$ and $\text{ord}_{q}\left(p-1\right)\mid2x$ hence, as $x$ is odd, $\text{ord}_{q}\left(p-1\right)$ is twice a factor of $x$ so $\frac{\text{ord}_{q}\left(p-1\right)}{2}$ is a factor of $x$ so is either $1$ or at least $q$.

Now by FLT: $\frac{\text{ord}_{q}\left(p-1\right)}{2}\mid\text{ord}_{q}\left(p-1\right)\mid q-1$ so $\frac{\text{ord}_{q}\left(p-1\right)}{2}\leq q-1\Rightarrow\frac{\text{ord}_{q}\left(p-1\right)}{2}=1\Rightarrow\text{ord}_{q}\left(p-1\right)=2$.

Now $\text{ord}_{q}\left(p-1\right)=2\Rightarrow\left(p-1\right)^{2}\equiv1\mod{q}\Rightarrow\left(p-1\right)^{x-1}\equiv1\mod{q}$ ($x$ is odd means $x-1$ is even). Thus $\left(p-1\right)^{x}\equiv p-1\mod{q}\Rightarrow\left(p-1\right)^{x}+1\equiv p\mod{q}$. But $q\mid\left(p-1\right)^{x}+1$ so $q\mid p\Rightarrow q=p\Rightarrow p\mid x$ which is a case that has already been dealt with.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
sayantanchakraborty
505 posts
#10 • 3 Y
Y by Tellocan, Adventure10, cubres
frill,your solution is really nice.....I like it.... BTW I don,t know why no one thought of using orders earlier....
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Blitzkrieg97
236 posts
#11 • 2 Y
Y by Adventure10, cubres
Davron wrote:
@all : can you please explain :-)

$q|[(p-1)^2x-1,(p-1)^{q-1}-1)=(p-1)^2-1$

Sincerely Davron
$q|(p-1)^{2x}-1$ because $(p-1)^{2x}-1=((p-1)^x+1)((p-1)^x-1)$ and $q|(p-1)^{q-1}-1$ from fermat's little theorem,so $q$ will divide GCD of them
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
#12 • 3 Y
Y by Adventure10, Mango247, cubres
First, note that if $x = 1$, then the desired relation trivially holds for all $p.$ Hence, the pair $(1, p)$ is valid for all primes $p.$ Now, let us consider the cases of $x = p$ and $p = 2, 3.$ If $x = p \ne 2, 3$, then we must have $p^{p - 1} \mid (p - 1)^p + 1.$ But note that $p \mid (p - 1) + 1$, so we may apply LTE to find that $v_p\left((p - 1)^p + 1^p\right) = v_p(p) + v_p(p) = 2.$ It follows that $p - 1 \ge 2$, which is impossible from the assumption that $p \ne 2, 3.$

If $p = 3$, we are searching for $x \in \{1, 2, 3, 4, 5, 6\}$ such that $x^2 \mid 2^x + 1.$ By testing these six possibilities, we find the solutions $(1, 3), (3, 3).$ If $p = 2$, we are searching for $x \in \{1, 2, 3, 4\}$ such that $x \mid 2.$ Thus we obtain the solutions $(1, 2), (2, 2).$ Furthermore, note that if $x$ is even, then $x^{p - 1} \mid (p - 1)^x + 1 \implies p - 1$ is odd, and so $p = 2$, which is a case that was already covered. Henceforward, we may assume that $x$ is odd.

Now, suppose that $x > 1$, and let $q \ne 2, p$ be the least prime divisor of $x.$ Then we have the relation \[(p - 1)^x \equiv -1 \pmod{q^{p - 1}} \implies (p - 1)^x \equiv -1 \pmod{q} \implies (p - 1)^{2x} \equiv 1 \pmod{q}.\] Hence, if we let $d = \text{ord}_q(2)$, it is well-known that $d \mid 2x.$ Furthermore, since $p - 1$ and $q$ are clearly relatively prime, we derive that \[(p - 1)^{q - 1} \equiv 1 \pmod{q} \implies d \mid q - 1 \implies d \le q - 1.\] Now, note that if $d \ne 2$, then there is some prime divisor of $d$ that is also a divisor of $x.$ However, this is impossible, because said divisor would have to be less than $q$ (because $d \le q - 1$), and we assumed that $q$ was the least prime divisor of $x.$ Therefore, we conclude that $d = 2.$ It follows that \[(p - 1)^2 \equiv 1 \pmod{q} \implies p(p - 2) \equiv 0 \pmod{q} \implies p - 2 \equiv 0 \pmod{q},\] because we assumed that $q \ne p.$ It follows that $(p - 1)^x + 1 \equiv 1^x + 1 \equiv 2 \pmod{q}.$ However, this contradicts $(p - 1)^x + 1 \equiv 0 \pmod{q}$, so we conclude that there are no such solutions.

In summary, the desired pairs are $(2, 2), (3, 3)$, and $(1, p)$ for any prime $p.$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Vfire
1354 posts
#13 • 3 Y
Y by AIME12345, Adventure10, cubres
1999 ISL NT 1 wrote:
Find all the pairs of positive integers $(x,p)$ such that p is a prime, $x \leq 2p$ and $x^{p-1}$ is a divisor of $ (p-1)^{x}+1$.

If $x=p$ then we have $p^{p-1} \mid (p-1)^p+1$. Since $p \mid (p-1)+1$, by LTE we know that $v_p((p-1)^p+1) = v_p((p-1)+1)+v_p(p) = 2$. Therefore, $p-1 \le 2 \implies p=2,3$. These yield the valid pairs $\boxed{(2,2), (3,3)}$. If $x=1$ then all pairs in the form $\boxed{(1,p)}$ where $p$ is a prime work. Now assume $p >2, x>1$ and $p \neq x$.

We have $x^{p-1} \mid (p-1)^x+1 \mid (p-1)^{2x}-1$. Notice that $x$ must be odd because $(p-1)^x+1$ is odd ($p >2$). Therefore, $\gcd(x^{p-1}, (p-1)^x-1)=1$ because $x^{p-1} \mid (p-1)^x+1$ and the smallest prime that divides $x^{p-1}$ is greater than $2$. Then if $q$ is the smallest prime factor of $x$, we know that $\text{ord}_q(p-1) \mid 2x$ and $\text{ord}_q(p-1) \nmid x$. Since $x$ is odd, we know that $\text{ord}_q(p-1) \ge 2q$ or $\text{ord}_q(p-1)=2$. However, since $\phi(q) = q-1$, we know that $\text{ord}_q(p-1) \mid q-1$ so we must have $\text{ord}_q(p-1)=2$. Hence, $(p-1)^2 \equiv 1 \pmod{q}$. Then $(p-1)^x+1 \equiv 0 \pmod{q} \implies p \equiv 0 \pmod{q}$. Since $p$ is prime, $p=q$ so $p$ must also equal $x$ since $x \le 2p$, which goes against our assumptions. Therefore, we are done. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
samoha
9 posts
#15 • 3 Y
Y by Adventure10, Mango247, cubres
Hey, noob here. A bit off-topic question, but is there something wrong with this statement below? (Not that it's useful)

This is for cases $x > 1, p > 2$.
$x^{p - 1} \mid \left(p - 1\right)^x + 1 \Rightarrow \nu_p(x^{p - 1}) \leq \nu_p(\left(p - 1\right)^x + 1^x) = \nu_p(p) +\nu_p(x) = 1 + \nu_p(x) \Rightarrow \left(p - 2 \right)\nu_p(x) \leq 1$
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
#16 • 3 Y
Y by Adventure10, Mango247, cubres
My solution: If $p=2$, then $x \mid 2 \Rightarrow x=1,2$. So from now on assume that $p$ is odd.

Now, $x^{p - 1} \mid \left(p - 1\right)^x + 1 \Rightarrow (p-1) \cdot \nu_p(x) = \nu_p(x^{p - 1}) \leq \nu_p(\left(p - 1\right)^x + 1) = \nu_p(p) +\nu_p(x) = 1 + \nu_p(x) \Rightarrow \left(p - 2 \right)\nu_p(x) \leq 1$.

CASE-1 ($\nu_p(x) \geq 1$): $p-2 \leq 1 \Rightarrow p \leq 3 \Rightarrow p=3$.

And, $p \mid x \Rightarrow 3 \mid x$ and $x \leq 2p = 6$ $\Rightarrow x=3$ or $6$. But $x^2 \mid 2^x+1 \Rightarrow x=3$

CASE-2 ($\nu_p(x)=0$): Notice that $x=1$ works for all $p$, so from now on assume that $x \not= 1$.

Let $m$ be a prime divisor of $x$. Note that as $p \nmid x$, so $p \not= m$. Then, $(p-1)^x+1 \equiv 0 \pmod{m} \Rightarrow (p-1)^{2x} \equiv 1 \pmod{m}$

Thus, $ord_m(p-1) \mid 2x$. Also $ord_m(p-1) \mid \phi(m) \Rightarrow ord_m(p-1) \mid m-1$.

Also as $ord_m(p-1) \leq m-1$, so $ord_m(p-1) \mid gcd(m-1,2x)$. But as $m \mid x \Rightarrow m-1 \nmid x$.

SUBCASE-1 ($m \not= 3$): $m-1 \nmid 2 \Rightarrow gcd(m-1,2x)=1 \Rightarrow ord_m(p-1) = 1 \Rightarrow p \equiv 1 \pmod{m}$

$\Rightarrow (p-1)^x+1 \equiv 1 \equiv 0 \pmod{m} \longrightarrow CONTRADICTION$.

SUBCASE-2 ($m=3$): $m-1 \mid 2 \Rightarrow gcd(m-1,2x) =2 \Rightarrow ord_m(p-1)=1 \text{or} 2$.

By a similar argument as in subcase-1, $ord_m(p-1) \not= 1 \Rightarrow ord_m(p-1) = 2 \Rightarrow (p-1)^2 \equiv 1 \pmod{m}$

$\Rightarrow p(p-2) \equiv 0 \pmod{m} \Rightarrow p-2 \equiv 0 \pmod{m} \Rightarrow (p-1)^x+1 \equiv 2 \equiv 0 \pmod{m} \longrightarrow CONTRADICTION$.

Thus, The only solutions are $(x,p)=(1,p),(2,2),(3,3)$.
This post has been edited 1 time. Last edited by math_pi_rate, Aug 23, 2018, 3:57 PM
Z K Y
G
H
=
a