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

G
Topic
First Poster
Last Poster
k a June Highlights and 2025 AoPS Online Class Information
jlacosta   0
Jun 2, 2025
Congratulations to all the mathletes who competed at National MATHCOUNTS! If you missed the exciting Countdown Round, you can watch the video at this link. Are you interested in training for MATHCOUNTS or AMC 10 contests? How would you like to train for these math competitions in half the time? We have accelerated sections which meet twice per week instead of once starting on July 8th (7:30pm ET). These sections fill quickly so enroll today!

[list][*]MATHCOUNTS/AMC 8 Basics
[*]MATHCOUNTS/AMC 8 Advanced
[*]AMC 10 Problem Series[/list]
For those interested in Olympiad level training in math, computer science, physics, and chemistry, be sure to enroll in our WOOT courses before August 19th to take advantage of early bird pricing!

Summer camps are starting this month at the Virtual Campus in math and language arts that are 2 - to 4 - weeks in duration. Spaces are still available - don’t miss your chance to have a transformative summer experience. There are middle and high school competition math camps as well as Math Beasts camps that review key topics coupled with fun explorations covering areas such as graph theory (Math Beasts Camp 6), cryptography (Math Beasts Camp 7-8), and topology (Math Beasts Camp 8-9)!

Be sure to mark your calendars for the following upcoming events:
[list][*]June 5th, Thursday, 7:30pm ET: Open Discussion with Ben Kornell and Andrew Sutherland, Art of Problem Solving's incoming CEO Ben Kornell and CPO Andrew Sutherland host an Ask Me Anything-style chat. Come ask your questions and get to know our incoming CEO & CPO!
[*]June 9th, Monday, 7:30pm ET, Game Jam: Operation Shuffle!, Come join us to play our second round of Operation Shuffle! If you enjoy number sense, logic, and a healthy dose of luck, this is the game for you. No specific math background is required; all are welcome.[/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, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
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
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
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
Sunday, Jun 15 - Oct 12
Thursday, Jun 26 - Oct 9
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
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
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
Tuesday, Nov 4 - Feb 10
Sunday, Dec 7 - Mar 8

Introduction to Number Theory
Monday, Jun 9 - Aug 25
Sunday, Jun 15 - Sep 14
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
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
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, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
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!)

Intermediate: Grades 8-12

Intermediate Algebra
Sunday, Jun 1 - Nov 23
Tuesday, Jun 10 - Nov 18
Wednesday, Jun 25 - Dec 10
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22
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, Jun 22 - Nov 2
Sunday, Sep 28 - Feb 15
Tuesday, Nov 4 - Mar 24

Intermediate Number Theory
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3
Wednesday, Sep 24 - Dec 17

Precalculus
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8
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

Olympiad Geometry
Tuesday, Jun 10 - Aug 26

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

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
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!)
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
Wednesday, Jun 11 - Aug 27
Sunday, Jun 22 - Sep 21
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
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!)
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
Monday, Jun 30 - Jul 21
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
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
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
Sunday, Jun 22 - Sep 21
Tuesday, Sep 2 - Nov 18

F=ma Problem Series
Wednesday, Jun 11 - Aug 27
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
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
Thursday, Aug 14 - Oct 30
Sunday, Sep 7 - Nov 23
Tuesday, Dec 2 - Mar 3

Intermediate Programming with Python
Sunday, Jun 1 - Aug 24
Monday, Jun 30 - Sep 22
Friday, Oct 3 - Jan 16

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

Physics

Introduction to Physics
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15
Tuesday, Sep 2 - Nov 18
Sunday, Oct 5 - Jan 11
Wednesday, Dec 10 - Mar 11

Physics 1: Mechanics
Monday, Jun 23 - Dec 15
Sunday, Sep 21 - Mar 22
Sunday, Oct 26 - Apr 26

Relativity
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
Jun 2, 2025
0 replies
My Unsolved Problem
ZeltaQN2008   5
N 21 minutes ago by Funcshun840
Source: IDK
Let \( ABC \) be an acute triangle inscribed in its circumcircle \( (O) \), and let \( (I) \) be its incircle. Let \( K \) be the point where the $A-mixtilinear$ incircle of triangle $ABC$ touches \((O)\). Suppose line \( OI \) intersects segment \( AK \) at \( P \), and intersects line \( BC \) at \( Q \). Let the line through \( I \) perpendicular to \( BC \) intersect line \( KQ \) at \( A' \). Prove that: \[AI \parallel PA'.\]
5 replies
ZeltaQN2008
Yesterday at 1:23 PM
Funcshun840
21 minutes ago
Angle QRP = 90°
orl   13
N 26 minutes ago by Ilikeminecraft
Source: IMO ShortList, Netherlands 1, IMO 1975, Day 1, Problem 3
In the plane of a triangle $ABC,$ in its exterior$,$ we draw the triangles $ABR, BCP, CAQ$ so that $\angle PBC = \angle CAQ = 45^{\circ}$, $\angle BCP = \angle QCA = 30^{\circ}$, $\angle ABR = \angle RAB = 15^{\circ}$.

Prove that

a.) $\angle QRP = 90\,^{\circ},$ and

b.) $QR = RP.$
13 replies
orl
Nov 12, 2005
Ilikeminecraft
26 minutes ago
students in a classroom sit in a round table, possible to split into 3 groups
parmenides51   1
N an hour ago by Magnetoninja
Source: Dutch IMO TST 2018 day 2 p4
In the classroom of at least four students the following holds: no matter which four of them take seats around a round table, there is always someone who either knows both of his neighbours, or does not know either of his neighbours. Prove that it is possible to divide the students into two groups such that in one of them, all students know one another, and in the other, none of the students know each other.

(Note: if student A knows student B, then student B knows student A as well.)
1 reply
parmenides51
Aug 30, 2019
Magnetoninja
an hour ago
Sharing is a nontrivial task
bjump   11
N an hour ago by HamstPan38825
Source: USA TST 2024 P5
Suppose $a_{1} < a_{2}< \cdots < a_{2024}$ is an arithmetic sequence of positive integers, and $b_{1} <b_{2} < \cdots <b_{2024}$ is a geometric sequence of positive integers. Find the maximum possible number of integers that could appear in both sequences, over all possible choices of the two sequences.

Ray Li
11 replies
1 viewing
bjump
Jan 15, 2024
HamstPan38825
an hour ago
No more topics!
Israel Number Theory
mathisreaI   67
N May 20, 2025 by lolsamo
Source: IMO 2022 Problem 5
Find all triples $(a,b,p)$ of positive integers with $p$ prime and \[ a^p=b!+p. \]
67 replies
mathisreaI
Jul 13, 2022
lolsamo
May 20, 2025
Israel Number Theory
G H J
Source: IMO 2022 Problem 5
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
InftyByond
210 posts
#63 • 1 Y
Y by cubres
plz help im cooked
can anybody read this solution and tell me how correct (and maybe a score out of 7)

$$a^p-a=b!+p-a$$So by FLT we get $$a(a^{p-1}-1)\equiv 0 \equiv b!+p-a \mod p.$$Thus, $$b!\equiv a \mod p.$$We may then conclude that if $b>p,$ then $b! \equiv 0 \mod p$.
If $b\leq p$, then we know that $$a^p\geq 2^p \geq 2p \geq b!+p$$which shows that the only solution in this case is $b=a=p=2$.

So we may now assume that $b! \equiv 0 \mod p$, and consequently $a \equiv 0 \mod p$.
Thus $\nu_p(a^p-p)=1$, and thus $\frac{b!}{p}$ cannot be divisible by $p$.
Replacing $a$ with $kp$ gives us $$a^p-p=k^pp^p-p=p(k^pp^{p-1}-1)=b!$$Dividing both sides by $p$ and taking mod $p$ gives that the right side must be equal to $(b-p)!\equiv 1 \mod p$.

We show that there are no solutions for $p \geq 5$.
We first show that $a=p$.
If $a=kp$ where $k>1$, then we know that another prime divides $a$, and if it divides $b!$ then we arrive at a contradiction.
So this means that $k>2p$.
Then we get $a^p>2^pp^2p>b!+p$, so $a=p$.
Then $p^p= (2p-1)!+p$.
$$p^p-p=(2p-1)!$$The right side is clearly greater than the left side for all values $p\geq 5$, so we only require to test $p=3$.
Then we get $(3, 4, 3)$ is another solution.

So the only solutions that are possible are $(2, 2, 2)$, and $(3, 4, 3)$.
The proof is complete.
This post has been edited 2 times. Last edited by InftyByond, Sep 11, 2024, 12:37 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
megarnie
5610 posts
#64 • 1 Y
Y by cubres
Resolving

The only solutions are $(2,2,2)$ and $(3,4,3)$, which clearly work. Now we show they are the only ones.
Claim: If $p = 2$, $a = b = 2$.
Proof: Assume $p = 2$. We have $a^2 = b! + 2$. If $b \ge 4$, then $4\mid b!$, so $a^2 \equiv 2 \pmod 4$, a contradiction. Thus, $b \le 3$ and we can check $b \in \{1,2,3\}$ and get that $a = b = 2$ is the only working solution. $\square$

Henceforth assume $p > 2$.

Claim: $b! > p$.
Proof: Note that $a = 1$ is obviously not possible. So $b! + p = a^p \ge 2^p > 2p$, meaning $b! > p$. $\square$
Claim: $b \ge p$.
Proof: Suppose not. Since $b! > p > 2$, $b  \ge3$. Note that \[a^p b! + p \le 2b! < (b+1)! < (b+1)^p, \]so $a < b + 1\implies a \le b$. Thus, $a\mid b!$. Since $a\mid a^p$, $a\mid a^p - b! = p$, so $a \in \{1,p\}$. Since $a \le b < p$, $a < p$, so $a = 1$, absurd. $\square$

Claim: $p\mid a$ and $b< 2p$
Proof: Firstly, \[b \ge p\implies p\mid b! \implies p\mid b! + p = a^p\implies p\mid a\]
Now, if $b \ge 2p$, then $p^2 \mid b!$, so $\nu_p(b! + p) = 1$, meaning $\nu_p(a^p) = 1$, contradiction since $p^p \mid a^p$. $\square$

Case 1: $a\ne p$
Then $a > p$. Let $a = xp$ for some $x > 1$.

Claim: $x \ge p$.
Proof: Let $q$ be a prime divisor of $x$. We show that $q \ge p$, which finishes. Suppose otherwise. Then note that $q\mid b! + p$ but $q \nmid p$ (as $q \ne p$), so $q\nmid b! \implies b < q < p$, absurd. $\square$

We now have $a^p  \ge (p^2)^p = p^{2p}$, so $p^{2p} \le b! + p < (b+1)! \le (2p)!$. However, note that \[(2p)! = p \cdot \prod_{i=1}^{p - 1}  i(2p - i) \le p \cdot \prod_{i=1}^{p - 1} p^2 = p^{2p - 1} \]by AM-GM, a contradiction.

Case 2: $ a=p$
Then $b! = p^p - p = p(p^{p - 1} - 1)$. Note that \[\nu_2(b!) \ge \nu_2((p)!) = p - s_2(p) \ge p - \log_2(p + 1),\]where $s_2$ is the sum of digits in base $2$. Now, by LTE \[\nu_2(p (p^{p - 1} - 1) ) = \nu_2(p^{p - 1} - 1^{p - 1}) = 2 \nu_2(p - 1) < 2 \log_2(p ) \]
Combining gives that $p - \log_2(p + 1) < 2 \log_2(p)$, so \[ 2\log_2(p) + \log_2(p + 1) > p\implies \log_2(p^2(p + 1)) > p\]
Thus, $2^p < p^2(p + 1)$.

Claim: $2^x > x^2(x+1)$ for all integers $x \ge 11$.
Proof: Let $f(x) = x^2(x+1)$. We wish to show $2^x > f(x) \forall x \ge 11$. We go by induction on $x$. The base case $x = 11$ is obviously true. . Suppose it's true for $11, 12,\ldots, n$. We have \[ \frac{f(n+1)}{f(n)} = \left( \frac{n+1}{n} \right) ^2 \cdot \frac{n+2}{n+1} = \left( 1 + \frac 1n \right)^2 \cdot \left( 1 + \frac{1}{n+1} \right) \le \frac{12}{11} ^2 \cdot \left( \frac{13}{12} \right) < 2 \]
Now, we have \[2^{n+1} = 2^n \cdot 2 > f(n) \cdot 2 > f(n) \cdot \frac{f(n+1)}{f(n)} = f(n+1),\]as desired. $\square$

This immediately implies that $p < 11$, so $p\in \{3,5,7\}$.

Note that if $p = 7$, then since $b \ge 7$, $5\mid b! = 7^7 - 7$, which is a contradiction as $7^7 \equiv 3 \pmod 5$.

Now if $p = 5$, we have $b! = 5^5 - 5 = 3120$, which isn't a factorial. Therefore, $p = 3$ and $b! = 3^3 - 3 = 24\implies b = 4$.

Hence $(a,b,p) = (3,4,3)$, as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
onyqz
195 posts
#65 • 1 Y
Y by cubres
storage
solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
EVKV
71 posts
#66 • 1 Y
Y by cubres
If b≥2p no sol
By mod p then mod p²

If b<p
And a>p then no sol
As a^p≥ (p+1)^p> (p-1)! +p≥b! +p

a≤b
Then a|p
Umpossible

So b<a<p

a^p> b! +p

So

b,a≥p

If p= b
And a>b
umpossible

if a<b also impossible
By mod p

p^p = p! +p might work

p^(p-1) > p!

(p+1)! > p! +p

So together p^p> p! +p
For p>2
Which gives 1 sol by bounding
2,2,2

If p<a,b<2p

a^p is not divisible by p
But b! +p is
so umpossible

a<p b>p has same problem

p<b<2p
a≥2p so a=kp
(kp)^p = b! +p
k=por k≥2p
If k≥2p
At a min
(2p)^p * p^(p) > b! + p

So k= p

If k= p
p^(2p) > b! + p
So only one final case remaining

a= p
p^p = b! +p
Take some odd prime q dividing p-1

2(vq(p-1)) = vq(b!)

If q||p-1
2= vq(b!)>4
So umpossible

q^k||(p-1)
2k = vq(b!) > k + k-1 +k-2 ...... =
(k+1)k /2
2> k+1/2
3>k
Let k= 2
4 = vq(b!)≥ 2+1
vq(b!) = 3 , 5..... So no 4
Umpossible
Thus there is no q

So 2^k = p^(p-1) -1

So only p,2 divide b!

So b≤4

Now done

3,4,3

Final solution (a,b,c) =(3,4,3),(2,2,2)
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cubres
123 posts
#67
Y by
Storage - grinding IMO problems
This post has been edited 1 time. Last edited by cubres, Dec 30, 2024, 7:49 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Scilyse
388 posts
#68 • 1 Y
Y by cubres
The solutions are $(2, 2, 2)$ and $(3, 4, 3)$.

If $b \geq 2p$, then $p \mid b! + p$, so $p \mid a^p$, so $p \mid a$. But $\nu_p(a^p) \geq p \geq 2$ and $\nu_p(b! + p) = \min\{\nu_p(b!), \nu_p(p)\} = 1$ since $2 \leq \nu_p(b!) \neq \nu_p(p) = 1$, contradiction.

If $p \leq b < 2p$, then once again $p \mid a$.
  • If $a \geq 2p^2$, then
    \begin{align*}
a^p \geq (2p^2)^p = 2^p p^{2p} &= \underbrace{p \cdot p \cdot \dots \cdot p}_{p \text{ times}} \cdot \underbrace{2p \cdot 2p \cdot \dots \cdot 2p}_{p \text{ times}} \\
&> 2 \cdot 2 \cdot 3 \cdot 4 \cdot 5 \cdot \dots \cdot 2p \\
&= 2 \cdot (2p)! \\
&> (2p)! + p \\
&> b! + p,
\end{align*}contradiction.
  • If $p^2 \leq a < 2p^2$, then let $a = kp$ for an integer $p \leq k < 2p$. Now
    \begin{align*}
b! + p = a^p = (kp)^p = k^p p^p &= \underbrace{p \cdot p \cdot \dots \cdot p}_{p \text{ times}} \cdot \underbrace{k \cdot k \cdot \dots \cdot k}_{p \text{ times}} \\
&> 2 \cdot 2 \cdot 3 \cdot 4 \cdot 5 \cdot \dots \cdot k \cdot 1 \cdot 1 \cdot \dots \cdot 1 \\
&= 2k! \\
&\geq k! + p.
\end{align*}Therefore, $b! + p > k! + p$, so $b > k$, so $k \mid b!$. Now observe that $k \mid a \mid a^p = b! + p$, so $k \mid p$. Since $p \leq k$, this implies that $k = p$. Hence, $p^{2p} = b! + p$.
    • If $b \geq p + 1$, then taking both sides modulo $p + 1$ yields
      \begin{align*}
(-1)^{2p} &\equiv -1 \pmod{p + 1} \\
1 &\equiv -1 \pmod{p + 1},
\end{align*}contradiction as $p + 1 \geq 3$.
    • If $b = p$, then we claim $p! + p < p^{2p}$ which yields a contradiction. Indeed,
      \begin{align*}
p^{2p} &= \underbrace{p^2 \cdot p^2 \cdot \dots \cdot p^2}_{p \text{ times}} \\
&> 2 \cdot 2 \cdot 3 \cdot 4 \cdot 5 \cdot \dots \cdot p \\
&= 2p! \\
&\geq p! + p,
\end{align*}as desired.
  • If $a < p^2$, then let $a = kp$ for an integer $1 \leq k < p \leq b$ so that $k \mid b!$ as above. Now observe that $k \mid a \mid a^p = b! + p$, so $k \mid p$. Since $k < p$, this implies that $k = 1$. Hence, $p^p - p = b!$.
    • If $p = 2$, then $(a, b, p) = (2, 2, 2)$, which works.
    • Otherwise, $p$ is odd. On one hand, \begin{align*}\nu_2(p^p - p) = \nu_2(p^{p - 1} - 1^{p - 1}) = \nu_2(p^2 - 1) + \nu_2\left(\frac{p - 1}{2}\right) \leq \log_2((p^2 - 1)(p - 1)) - 1 < 3 \log_2 p - 1.\end{align*}On the other hand, \[\nu_2(b!) = b - s_2(b) \geq b - (\log_2 b + 1) = \log_2\left(\frac{2^b}{b}\right) - 1.\]Since $\frac{2^x}{x}$ is increasing on $[2, \infty)$, we have \[\log_2\left(\frac{2^b}{b}\right) - 1 \geq \log_2\left(\frac{2^p}{p}\right) - 1 = p - \log_2 p - 1.\]Hence $3 \log_2 p - 1 > p - \log_2 p - 1$, or equivalently, $2^p < p^4$. This fails for all $p \geq 17$, so it suffices to check $p \in \{3, 5, 7, 11, 13\}$.
      • If $p = 3$, then $(a, b, p) = (3, 4, 3)$, which works.
      • If $p = 5$, then $b! = 3120$, bad.
      • If $p = 7$, then $b! = 823536$, bad.
      • If $p = 11$, then $b! = 285311670600$, which is contained between $14! = 87178291200$ and $15! = 1307674368000$, bad.
      • If $p = 13$, then $b! = 302875106592240$, which is contained between $16! = 20922789888000$, $17! = 355687428096000$, bad.
If $2 \leq b < p$, then obviously $a < p$ as $p \nmid a$ and if $a \geq p$ then \[b! + p \leq \frac{b}{2} \cdot b^{b - 1} + p \leq b^b < p^p \leq a^p,\]contradiction.
  • If $a < b$, then $a \mid b!$ and $a \mid a^p \mid b! + p$, so $a \mid p$, which implies that $a = 1$. This obviously yields no solutions.
  • If $a \geq b$, then (noting that $a \geq 2$ here)
    \begin{align*}
a^p &= (a - 1) \cdot a^{p - 1} + a^{p - 1} \\
&\geq (a - 1) \cdot \underbrace{a \cdot a \cdot \dots \cdot a}_{p - 1 \text{ times}} + p \\
&\geq 1 \cdot 2 \cdot 3 \cdot 4 \cdot \dots \cdot b \cdot 1 \cdot 1 \cdot \dots \cdot 1 + p \\
&= b! + p.
\end{align*}The condition $a = b = 2$, derived from the equality case of the second inequality, is necessary for equality to hold throughout. But this implies that $p = 2$, contradicting the assumption that $b < p$.
Lastly, if $b = 1$, then $a^p = p + 1$. Of course, if $a = 1$, then $p = 0$, which is impossible, and if $a \geq 2$, then we can induct on $p$ to get that $a^p > p + 1$. Hence, there are no solutions in this case.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
SimplisticFormulas
132 posts
#69 • 2 Y
Y by cubres, radian_51
doesn’t feel too tough for n4

We claim that $(a,b,p)=(2,2,2)$ and $(3,4,3)$ are the only solutions.
Firstly, we show that $b \le 2p$. Indeed, assume the contrary. Then $p \mid p+ b!=a^p \implies p \mid a \implies p^p \mid a^p$. But $p^2 \nmid p + b!$ since $p^2 \nmid p$, giving us the desired contradiction.

Next, we shall prove that $p \mid a$. Indeed, assume otherwise. Then any prime factor $q$ of a must not $b!$ since $q \mid b!+p$ but $q \nmid p$. So $b<q \le a$, But note that $p=a^p - b! >a^p -b^p>p$, which is absurd.

Now, note that $a \le b$. If this is not the case then $p=a^p - b! >a^p -b^p>p$, which is contradictory. This shows that $a=p$.
Hence, $b!= p^p-p=p(p^{p-1}-1)$, so $b> \ge p$ From here it’s basically same as $(iii)$ of @Leartia.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ilikeminecraft
685 posts
#70
Y by
If $p = 2,$ we have $a = 2, b = 2.$ If $p = 3,$ $a = 3, b = 3.$ Thus, assume that $p\geq5.$

First, notice that if $b \geq2p,$ then $\nu_p(b!) \geq2,$ while $\nu_p(a^p - p) \leq 1.$ Hence, $b < 2p.$ We also have that if $b = 2p - 1, $ then by Wilsons theorem, $\frac{b! + p}{p} \equiv 2\pmod p,$ and hence can't work.

Now, AFTSOC that $b < p.$ Thus, $a^p - p = b! \leq b^p\implies a \leq b.$ Thus, taking modulo $a,$ we have that $0 \equiv a^p \equiv b! + p \equiv p \pmod a.$ Thus, $a \mid p\implies a = p$ or $a = 1.$ If $a = p,$ then $a \leq b < p = a,$ which is a contradiction.

Thus, $p\leq b < 2p - 1.$ By the upper bound, we have that $b! + p < (2p - 1)! + p < (1\cdot(2p - 1))(2\cdot(2p - 2))\cdot p < (p^2)^p$ By taking modulo $p - 1,$ we have that $a^p \equiv 1 \pmod {p - 1}.$ Thus, $\operatorname{ord}_{p - 1}(a) \mid (\phi(p - 1), p) = 1 \implies a \equiv 1 \pmod {p - 1}.$ Thus, $a \equiv p \pmod{p^2 - p}\implies a = p.$

Thus, we are solving $p^p - p = b!.$ By taking $\nu_2,$ we have that $\nu_2(p^p - p) = \nu_2(p - 1) + \nu_2(p-1) \leq 2\log_2(p -1),$ and $\nu_2(p!) \geq p-\log_2(p+1)$ by legrende. It is obvious that $\nu_2(p!)>\nu_2(p^p-p)$ for $p\geq 10$ from this bound. Manually checking $p = 5, 7$ is trivial.
This post has been edited 1 time. Last edited by Ilikeminecraft, Mar 14, 2025, 6:06 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ray66
49 posts
#71
Y by
There are 3 cases.

First if $p>b$, then $a^p = b! + p$, so $a$ is not divisible by any prime $\le b$, and $a \neq 1$, so the LHS becomes too large because $a^p > a^b > b^p > b!+p$.

Next if $1 < p \le \frac{b}{2}$, then $p | a$ because $p$ divides both the RHS and LHS, but the RHS has 1 factor of $p$ because $2p\le b$, so there are no solutions.

Next if $\frac{b}{2} < p \le b$, then $a=p$ because if $a \ge 2p > b$, the LHS grows too fast. Then $b! = p^p-p$ and $\frac{b!}{p}=p^{p-1}-1$. LTE gives $\nu_2(b!) = \nu_2(p-1) + \nu_2(p-1) + \nu_2(p+1)-1$ but this means that $b \le 6$. From here we can check that $(2,2,2)$ and $(3,4,3)$ work
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cursed_tangent1434
661 posts
#72
Y by
The only solutions are $(2,2,2)$ and $(3,4,3)$ which clearly work. We start off with some bounding.

Claim : We have $p \le b < 2p$.

Proof : If $b \ge 2p$ note that $p\mid b!+p$ and hence $p\mid a^p$ so $p\mid a$. But then,
\[p^2 \mid a^p - b! = p\]which is a very clear contradiction. Further, if $b<p$ and $a \le b$ then there exists some prime $r<p$ such that $r\mid a$ (clearly $a>1$) so
\[r \mid a^p - b!=p\]which is again a contradiction. Thus we must have $a>b$ but then,
\[a^p \ge (b+1)^p \ge b^p + p\cdot b^{p-1} \ge b^p+p > b!+p\]which is also a contradiction. Thus, there is no possibility for $b$ to violate these bounds, proving the claim.

Claim : We have $a=p$ exactly.

Proof : Since $b \ge p$ we note that,
\[p\mid b!+p=a^p\]so $p\mid a$. Now, say there exists a prime $r<p$ such that $r \mid a$. But then,
\[r \mid a^p-b! =p\]which is a clear contradiction. Thus, such a prime $r$ cannot exist, implying that $a \ge p^2$, which is impossible since
\[a^p\ge p^{2p} \ge (2p)! +p > b! +p\]for all primes $p \ge 3$ (we deal with $p=2$ separately later) or $a=p$ which is the only remaining possibility.

Now, if $p=2$ we have
\[a^2=b!+2 \equiv 2 \pmod{4}\]for all $b \ge 4$ which is impossible, implying that $b \in \{1,2,3\}$ of which only $b=2$ works yielding the solution set $(a,b,p)=(2,2,2)$.

Thus, we are left to sort out the equation,
\[p^p-p=b!\]for all primes $ p >2$. Note that if $p=3$ we have $b=4$ yeilding the solution set $(a,b,p)=(3,4,3)$ so we consider $p>3$ in what follows. By the Lifting the Exponent Lemma,
\[\nu_2(p^{p-1}-1) = 2\nu_2(p-1)+\nu_2(p+1)-1 \le \max(2\nu_2(p-1)+\nu_2(p+1)+1) \le 2\log_2(p-1)\]However, by Legendre's Formula we have
\[\nu_2(b!) \ge \nu_2(p!) \ge \lfloor{\frac{p}{2}}\rfloor\]Further,
\[\lfloor{\frac{p}{2}}\rfloor > 2\log_2(p-1) \]for all $p \ge 10$. Thus, we must have $p \in \{5,7\}$ which are fairly easy to check by hand.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Maximilian113
577 posts
#73
Y by
We proceed with casework. Suppose that $a \leq b.$ Then let $q | a$ be a prime, as $a | b!$ it follows that $$a^p = b!+p \implies p \equiv 0 \pmod q \implies q=p.$$So $a$ is a power of $p.$ Now note that $b<2p$ as otherwise $v_p$ of the RHS is $1.$ If $a \geq p^2,$ we have that $$(2p-1)!+p > b!+p = a^p \geq p^{2p}.$$However by AM-GM $$p^{2p}-p \leq (2p-1)! \leq p (1 \cdot (2p-1)) (2 \cdot(2p-2)) \cdots \leq p \cdot \left( p^{p-1}\right)^2 = p^{2p-1},$$which is a contradiction. So $a=p.$ We deal with this case later.

If $a > b,$ note that $b!+p > b^p \implies b \geq p.$ Hence $b < 2p$ by the same argument as above. So $p | (b!+p) \implies p|a.$ By the same argument as above $a < p^2.$ But then write $a=kp$ with $k < p.$ If $k \neq 1$ taking mod $k$ yields $$0 \equiv b! + p \equiv p \pmod k \implies k | p \implies k = p,$$a contradiction. So $k=1 \implies a=p,$ though this is impossible as $p=a>b\geq p.$

Now it suffices to deal with the case that $a=p.$ The equation becomes $$b!=p^p-p.$$From above $2p > b \geq p.$ Suppose that $p \equiv 1 \pmod 4.$ Then by LTE $$v_2(b!) = v_2(p^{p-1}-1) = 2v_2(p-1)+v_2(p+1)-1 =2v_2(p-1).$$If $p \geq 13,$ observe that $\{2, 4, (p-1)/2, p-1\}$ is a set of distinct elements, and each of these are in the product of $b!$ as $b \geq p.$ Then $v_2(b!) \geq v_2(4)+2v_2(p-1),$ a contradiction. So it suffices to check $p=5,$ but this clearly does not work.

Now if $p \equiv 3 \pmod 4,$ by LTE $$v_2(b!) = 2v_2(p-1)+v_2(p+1)-1 = v_2(p+1)+1.$$But for $p \geq 11$ $\{2, 4, (p+1)/2\}$ is a set of distinct elements in the product of $b!,$ as $b \geq p$ so $v_2(b!) \geq v_2(p+1)+2,$ contradiction. So we should manually check $p=3, 7.$ $p=7$ does not work as $5$ does not divide $7^7-7$ so $b \leq 4,$ contradiction. $p=3$ works. Finally if $p$ is even $p=2$ and this works. Hence the only solutions are $(a, b, p) = (3, 4, 3), (2, 2, 2).$ They clearly work.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Jlzh25
1 post
#76
Y by
mathisreaI wrote:
Find all triples $(a,b,p)$ of positive integers with $p$ prime and \[ a^p=b!+p. \]
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Adywastaken
81 posts
#78
Y by
Assume FTSOC $b<p$.
Case 1:$a\le b<p$
$a\mid p \implies a=1$, but $1\neq b!+p$

Case 2: $a>b$
\[
a^p-p>(b+1)^p-p>b^p>b!
\]
So, $b\ge p$. Then, $a=kp$ and $v_p(b!)=v_p((kp)^p-p)=1$, so $b\le 2p$.

If $a\ge p^2$, then $b!+p=a^p>p^{2p}$, $\Rightarrow \Leftarrow$.

Now, $b!$ and $a$ have no common factors apart from $p$, so $k=1$.

$p^p-p=b!$, so
\[
v_2(p^p-p)=v_2(p^{p-1}-1)=2v_2(p-1)=v_2(b!).
\]So, if $p-1$,$\frac{p-1}{2}$, $4$ all divide $b!$, $\Rightarrow \Leftarrow$

Thus, $p=5$ or $p<5$.

Checking gives $(a,b,p) = (2,2,2), (3,4,3)$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
maromex
230 posts
#79
Y by
Wow I just solved this problem 40 mins after @above lol
Take mod $p$, so we find that $a \equiv b! \pmod p$. So $p$ divides $a$ if and only if $b \ge p$.
By the way, what do we think is the answer?
For example, $(2,2,2),(3, 4, 3)$.
Consider the case where $b \ge p$. After taking mod $p^2$, then we must also have $b \le 2p$. We will prove that $a < p^2$. We must first manually prove this for $p = 2$. If $a = 4$, then $14 = b!$, contradiction. If $a = 5$ then $23 = b!$, contradiction. If $a \ge 6$ then we see that $24 = 4! \ge b! > 34$ which is a contradiction.

Now, suppose $p \ge 3$. Assume for contradiction that $a \ge p^2$. Then we must have $$b! + p \ge p^{2p}.$$Because $b \le 2p$, we must have $(2p)! + p \ge p^{2p}.$ However, we can prove that $$(2p)! + p < p^{2p}$$by induction on $p$, as a positive integer. The statement holds for $p = 3$, because $723 < 729$. Now assume the statement holds for $p=k$. Then, we need to prove $$(2k + 2)! + k + 1 < (k + 1)^{2k+2}.$$We have $(2k)! < k^{2k} - k$, which implies $(2k + 2)! + k + 1 < (4k^2 + 6k + 2)(k^{2k} - k) + k + 1.$ Notice that, by the Binomial Theorem, $$(k + 1)^{2k+2} \ge k^{2k+2} + (2k + 2)k^{2k+1} + (k+1)(2k+1)k^{2k} + \frac{1}{3}(k+1)(2k+1)(2k)k^{2k-1}$$$$=\left(\frac{19}{3}k^2 + 7k + 1\right)k^{2k} > (4k^2 + 6k + 2)k^{2k}.$$From here our goal follows, and the induction case is done.

A prime less than $p$ cannot divide $b! + p$, because it divides $b!$ but not $p$. Thus, such a prime cannot divide $a^p$ either. Therefore, $$a = p.$$
So we have $$p^p = b! + p \implies p(p^{p-1} - 1) = b!.$$If $p = 2$, only solution is $(2, 2, 2)$. Using Lifting the Exponent lemma, for all odd primes $p$, $$\nu_2(p^{p-1} - 1) = 2\nu_2(p-1) + \nu_2(p+1) - 1. $$We have already found the working triple for $p = 3$. If $p = 5$, then we get $3120 = b!$ which is never true.

If $p = 7$, then we see that $43 \mid 344 \mid (7^3 -+ 1)(7^3 - 1) \mid 7(7^6 - 1) = b!$, which is a contradiction because $b \le 14$ but $b \ge 43$.

If $p = 11$, Legendre's formula tells us that $\nu_2(b!) \ge \nu_2(11!) = 8$. However, we know that $\nu_2(p(p^{p-1} - 1)) = 3$, contradiction. If $p = 13$, we see that $\nu_2(b!) \ge \nu_2(13!) = 10$, but $\nu_2(p(p^{p-1} - 1)) = 4$. If $p = 17$, we get $\nu_2(b!) \ge \nu_2(17!) = 15$, but $\nu_2(p(p^{p-1} - 1)) = 8$.

If $p \ge 19$, notice that one of $\nu_2(p-1)$ and $\nu_2(p+1)$ is equal to $1$, and both of them are at most $\log_2(p)$. Therefore, $\nu_2(p^{p-1} - 1) \le 2\log_2(p)$. Also, $\nu_2(b!) \ge \frac{p-1}{2}$. However, we find that $$2 \log_2(p) < \frac{p-1}{2}.$$This is a contradiction. Therefore, the only solutions in this case are $(2, 2, 2)$ and $(3, 4, 3)$.

The next case is where $b < p$. We have $a \neq 1$, because $b! + p > 1$. Now, $a^p > (a - 1)! + p$ for all positive integers $p \ge 2$ and $a \ge 2$, which can be shown by induction on $p$. Thus, the given equation $a^p = b! + p$ cannot be satisfied for $a > b$. We must have $a \le b$. Now, taking the given equation mod $a$, we get $$0 \equiv p \pmod a.$$Therefore, $a$ divides $p$. Because $a$ is not $1$, we must have $a = p$. But then $b \ge p$, contradiction. Indeed the only solutions are $(2, 2, 2), (3, 4, 3)$.
This post has been edited 2 times. Last edited by maromex, May 20, 2025, 4:53 PM
Reason: fix
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
lolsamo
20 posts
#80
Y by
The post name should be Belgium number theory, lol.
Z K Y
N Quick Reply
G
H
=
a