G
Topic
First Poster
Last Poster
k a April Highlights and 2025 AoPS Online Class Information
jlacosta   0
Yesterday at 3:18 PM
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
Yesterday at 3:18 PM
0 replies
n=y^2+108
Havu   3
N a minute ago by MR.1
Given the positive integer $n = y^2 + 108$ where $y \in \mathbb{N}$.
Prove that $n$ cannot be a perfect cube of a positive integer.
3 replies
+1 w
Havu
an hour ago
MR.1
a minute ago
D1010 : How it is possible ?
Dattier   13
N 24 minutes ago by Dattier
Source: les dattes à Dattier
Is it true that$$\forall n \in \mathbb N^*, (24^n \times B \mod A) \mod 2 = 0 $$?

A=1728400904217815186787639216753921417860004366580219212750904
024377969478249664644267971025952530803647043121025959018172048
336953969062151534282052863307398281681465366665810775710867856
720572225880311472925624694183944650261079955759251769111321319
421445397848518597584590900951222557860592579005088853698315463
815905425095325508106272375728975

B=2275643401548081847207782760491442295266487354750527085289354
965376765188468052271190172787064418854789322484305145310707614
546573398182642923893780527037224143380886260467760991228567577
953725945090125797351518670892779468968705801340068681556238850
340398780828104506916965606659768601942798676554332768254089685
307970609932846902
13 replies
Dattier
Mar 10, 2025
Dattier
24 minutes ago
iran tst 2018 geometry
Etemadi   10
N 24 minutes ago by amirhsz
Source: Iranian TST 2018, second exam day 2, problem 5
Let $\omega$ be the circumcircle of isosceles triangle $ABC$ ($AB=AC$). Points $P$ and $Q$ lie on $\omega$ and $BC$ respectively such that $AP=AQ$ .$AP$ and $BC$ intersect at $R$. Prove that the tangents from $B$ and $C$ to the incircle of $\triangle AQR$ (different from $BC$) are concurrent on $\omega$.

Proposed by Ali Zamani, Hooman Fattahi
10 replies
Etemadi
Apr 17, 2018
amirhsz
24 minutes ago
Functional equations
hanzo.ei   10
N an hour ago by truongphatt2668
Source: Greekldiot
Find all $f: \mathbb R_+ \rightarrow \mathbb R_+$ such that $f(xf(y)+f(x))=yf(x+yf(x)) \: \forall \: x,y \in \mathbb R_+$
10 replies
hanzo.ei
Mar 29, 2025
truongphatt2668
an hour ago
No more topics!
Israel Number Theory
mathisreaI   62
N Mar 31, 2025 by cursed_tangent1434
Source: IMO 2022 Problem 5
Find all triples $(a,b,p)$ of positive integers with $p$ prime and \[ a^p=b!+p. \]
62 replies
mathisreaI
Jul 13, 2022
cursed_tangent1434
Mar 31, 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.
mathisreaI
9 posts
#1 • 15 Y
Y by dangerousliri, rightways, ylt_chn, GoodMorning, S.Ragnork1729, Mathlover_1, Matherer9654, mathmax12, NO_SQUARES, deplasmanyollari, buddyram, un_educated, Funcshun840, cubres, MS_asdfgzxcvb
Find all triples $(a,b,p)$ of positive integers with $p$ prime and \[ a^p=b!+p. \]
This post has been edited 2 times. Last edited by v_Enhance, Jul 13, 2023, 6:28 PM
Reason: missing full stop
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
squareman
966 posts
#2 • 28 Y
Y by fuzimiao2013, asdf334, YaoAOPS, khina, teasaffrontaffy, Bradygho, ike.chen, rightways, AndreiVila, megarnie, JG666, ylt_chn, rama1728, haha-SuperDaivish, ApraTrip, Quidditch, rayfish, A_Crabby_Crab, Mathlover_1, mathmax12, myh2910, Lightosv, Sedro, cubres, Funcshun840, Alex-131, MS_asdfgzxcvb, bakkune
The answers are $\boxed{(2,2,2)}$ and $\boxed{(3,4,3)}.$

First verify $1 < (1+p)^{1/p} < 2$ for any prime $p$ so $b = 1$ impossible.

If $2\le b < p$ then take any prime $q\mid b!+p = a^p.$ Then $q > b.$ But $b! + p \le b^p < q^p \le a^p$ when $2 \le b < p,$ impossible.

If $b \ge p$ then $a = kp$ for some positive integer $k.$ Note $v_p(a^p - p) = 1$ so $b < 2p.$ Note $k < p$ to allow $(kp)^p \le (2p-1)! + p.$ If some prime $q < p$ divides $k$ then $b < q,$ but $(kp)^p > (q-1)! + p,$ contradiction. So $k = 1.$

Note that $v_2(p^p-p) \le 2\log_2(p-1)$ (LTE) and $v_2(p!) \ge p-\log_2(p+1)$ (Legendre's). So $p-\log_2(p+1) \le 2\log_2(p-1) \implies p < 10.$ Finite case check on $p=2,3,5,7$ finishes. $\blacksquare$
This post has been edited 2 times. Last edited by squareman, Jul 13, 2022, 3:02 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Leartia
93 posts
#3 • 3 Y
Y by angelthirty, Mango247, cubres
Motivation: I have seen 2018 P5, 2019 P4. Think about size in addition to $v_p.$

Suppose $p>10.$
$\textit{(i)}$
If $b\geq 2p$ then $v_p(b!)\geq 2$ therefore $v_p(b!+p)=1$ hence $v_p(a^p)=1.$
This means that $p\mid a^p$ which implies that $p\mid a$ therefore $v_p(a^p)=pv_p(a)=p.$
Hence $p=1$ but this is absurd.
$\textit{(ii)}$
If $b<p.$ In this case $b!<b^p\Rightarrow b!+b<b^p+p\Rightarrow a^p<b^p+p.$
Since perfect $p$ powers should be at least $p+1$ apart we have that $a^p<b^p\Rightarrow a<b.$
This implies that $a\mid b!$ therefore $a\mid p$ and either $a=1$ or $a=p.$
$a=1$ doesn't work. If $a=p$ then $p^p=b!+p$ so a size argument gives an immediate contradiction.

$\textit{(iii)}$ If $p\leq b<2p.$
If there exists a prime $q$ such that $q\neq p$ and $q\mid a$ then $q>b\geq p.$
Furthermore, $a^p\geq q^pp^p>p^{2p}>(2p-1)!+p>b!+p.$
Hence no such $q$ can exist. Therefore $a=p^\alpha.$ By checking this size argument you see that we must have $\alpha=1.$ Thus $a=p.$
Using LTE we have $v_2(p^{p-1}-1)=v_2(p-1)+v_2(p+1)+v_2(p-1)-1=v_2(b!).$
Using that legendre formula or whatever it's called we get $v_2(b!)=b-s_2(b).$
Since we have $p\leq b<2p$ we get $v_2(b!)=b-s_2(b)\geq p-\log_2(2p).$
On the other hand $2\log_2(p-1)+\log(p+1)-1\geq 2v_2(p-1)+v_2(p+1)-1.$
Putting this stuff together we get $$2\log_2(p-1)+\log_2(p+1)-1\geq p-\log_2(2p)$$But this does not hold for $p>10.$ Thus we get our desired contradiction.
Now we check $p=2,3,5,7$ with $b$ in the appropriate range.
This post has been edited 1 time. Last edited by Leartia, Jul 13, 2022, 8:32 AM
Reason: Typo
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MarkBcc168
1594 posts
#4 • 5 Y
Y by yaron235, GeoKing, 1475393141xj, cubres, AnthonyDraude
Very easy for a 5. I found this comparable to P4.

All answers are $(a,b,p) = (2,2,2), (3,4,3)$. The key claim is the following.

Claim: $a$ is not divisible by any prime $q<p$.

Proof: Assume so. Then, $q\nmid a^p-p=b!\implies b<q$. Therefore,
$$b! \leq (q-1)! < q^{p-1} < q^p-p,$$so $a < q$, a contradiction. $\blacksquare$

Now we have two cases:
  • If $p \nmid a$, then $p\nmid b!\implies b < p$, so
    $$b! \leq (p-1)! < p^{p-1} \leq p^p-p,$$or $a<p$. This gives a contradiction to the above claim.
  • If $p\mid a$, then $p^2\nmid a^p-p \implies b < 2p$, so
    \begin{align*}
b! &\leq (2p-1)! \\
&= (1(2p-1))(2(2p-2)) \dots ((p-1)(p+1)) p \\
&< (p^2)(p^2)\dots (p^2) p \\
&= p^{2p-1} \leq (p^2)^p-p, \\
\end{align*}so $a < p^2$. Therefore, the claim forces $a=p$. If $p\geq 5$, then by Zsigmondy theorem, we can find a prime $q$ such that $\operatorname{ord}_q(p) = p-1$, so that $q\geq 2(p-1)+1 = 2p-1$ and $q\mid p^p-p$. This forces $p^p-p=(2p-1)!$, and we can finish by bounding because the LHS is too small.
In conclusion, we must have $a=p$ and $p\in\{2,3\}$.
This post has been edited 1 time. Last edited by MarkBcc168, Jul 24, 2022, 3:17 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
asdf334
7586 posts
#5 • 2 Y
Y by ItalianPhysicist, cubres
squareman wrote:
The answers are $\boxed{(2,2,2)}$ and $\boxed{(3,4,3)}.$

First verify $1 < (1+p)^{1/p} < 2$ for any prime $p$ so $b = 1$ impossible.

If $2\le b < p$ then take any prime $q\mid b!+p = a^p.$ Then $q > b.$ But $b! + p \le b^p < q^p \le a^p$ when $2 \le b < p,$ impossible.

If $b \ge p$ then $a = kp$ for some positive integer $k.$ Note $v_p(a^p - p) = 1$ so $b < 2p.$ Note $k < p$ to allow $(kp)^p \le (2p-1)! + p.$ If some prime $q < p$ divides $k$ then $b < q,$ but $(kp)^p > (q-1)! + p,$ contradiction. So $k = 1.$

Note that $v_2(p^p-p) \le 2\log_2(p-1)$ (LTE) and $v_2(p!) \ge p-\log_2(p+1)$ (Legendre's). So $p-\log_2(p+1) \le 2\log_2(p-1) \implies p < 10.$ Finite case check on $p=2,3,5,7$ finishes. $\blacksquare$

:D
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Skender
30 posts
#7 • 2 Y
Y by Mango247, cubres
The solutions are $(2,2,2)$ are $(3,4,3)$.

1. $p|a$:
If not, then $b<p$, by $\mod p$, and $b<a$, by $\mod a$. Then, $a^p\geq a^{b+1}>2b!$ and $a^p\geq 2^p\geq 2p$, so $a^p$ is too large.

2. $p\leq b\leq 2p-1$:
$b!$ must be a multiple of $p$, but not of $p^2$, which is the same as $p\leq b\leq 2p-1$.

3. $a=p$:
Let $a=pk$. If $1<k<p$, then, by $\mod k$, $k|p$, contradiction. If $k\geq p$, then $(p^2)^p\leq a^p=b!+p\leq (2p-1)!+p\leq (2p-1)!\cdot p=\prod_{i=0}^{p-1} (p-i)(p+i)< (p^2)^p$, contradiction. Thus, $k=1$.

4. $p<5$:
Suppose otherwise. Then, $p^p>p!+p$, so $b\geq p+1$. Now, our equation is $p(p^{p-1}-1)=b!$. But, by Lifting the Exponent Lemma, $v_2(p(p^{p-1}-1))=v_2(p-1)+v_2(p+1)+v_2(p-1)-1$. On the other hand, letting $p-1=d_1d_2$ (since $p\geq 5$ implies $p-1$ not prime), we have $v_2(b!)\geq v_2(d_1)+v_2(d_2)+v_2(p-1)+v_2(p+1)= v_2(p-1)+v_2(p-1)+v_2(p+1)> v_2(p(p^{p-1}-1))$, contradiction.

Thus, $a=p=2$ or $a=p=3$, giving us the mentioned solutions.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
juckter
322 posts
#8 • 4 Y
Y by khina, wangqing_cn, DrYouKnowWho, cubres
This may actually be the single least interesting-looking IMO problem I've read so that's fun.

$(2, 2, 2)$ and $(3, 4, 3)$. Discard $a = 1$. Notice that $\gcd(a, b!) \mid p$. Consider two cases depending on whether $p$ divides $a$.

If $p \nmid a$ then $p \nmid b! + p$ so $b < p$. Now if $a \le b$ then $a$ and $b!$ share some prime factor which must be less than $p$, impossible. Therefore $a \ge b + 1$ and $a^p \ge (b + 1)^p > b^p + pb^{p - 1} > b! + p$ so we fail in this case.

If $p \mid a$ then $p \mid b! + p$ so $b \ge p$. Moreover $p^2 \nmid a^p - p$ so $b < 2p$. Now let $a = pk$. Since $a$ cannot have prime factors in common with $b!$ other than $p$ we must either have $k = 1$ or $k \ge p$. In the latter case we have $a^p - p \ge p^{2p} - p > (2p - 1)! \ge b!$ which is a contradiction, so we must have $k = 1$ and $a = p$. We can also check $p^{2p} - p > p!$ so $b \ge p + 1$.

Seeking a final contradiction we look at $\nu_2$. By LTE we have $\nu_2(p^p - p) = 2\nu_2(p - 1) + \nu_2(p + 1) - 1$. If $p \ge 7$ then from $b \ge p + 1$ we get

$$\nu_2(b!) \ge \nu_2((p + 1)!) \ge \nu_2(p + 1) + \nu_2(p - 1) + \nu_2((p - 1)/2) + \nu_2(2) = 2\nu_2(p - 1) + \nu_2(p + 1)$$
which contradicts $b! \mid a^p - p$. We are then left to check $p = 2, p = 3$ and $p = 5$ which give the aforementioned solutions.
This post has been edited 1 time. Last edited by juckter, Jul 13, 2022, 5:12 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
VicKmath7
1386 posts
#10 • 1 Y
Y by cubres
Really doable NT, and the ideas are very similar to those in 2021 N5 as well. Here is my solution:
Case 1. Let $1<b \leq p-1$. Note that if a prime $q$ divides $a$, then $q \neq p$ and hence it's impossible $b \geq q$. Therefore, all prime divisors of $a$ are bigger than $b$, so $a>b$ and $b!+p \leq b^p < a^p$, done (the first inequality is due to $b<p$).
Case 2. Let $p \leq b <2p$ (the other cases are impossible, since the RHS will have $v_p=1$). Obviously $p|a$, so let $a=cp$. The idea is that $c=1$ is the only possibility.
Firstly, we can bound $c<p$ (we need this in order to get a prime $q \leq b$ divdiding $a$, so as to finish as in the above case), otherwise $(2p-1)!+p=a^p \geq  p^{2p}$, but this is impossible, since $(2p-1)! \leq (\frac {2p-1}{2})^{2p-1} <p^{2p-1}$ by AM-GM, absurd (by the way, a similar bound with AM-GM was used in 2021 N5 to bound a factorial). Now take a prime $q|c$ and note that since $q<p<b$, $q$ will divide $b!$, hence $p$, absurd. So the only left possibility is $c=1$.
We have the equation $p(p^{p-1}-1)=b!$. The idea is to use $v_2$ and Legendre (well, $v_2$ is easier to bound than $v_q$ for a prime $q|p-1$). Note that $v_2(b!)>\frac{b}{2}-1>\frac{p-1}{2}$ and $v_2(p^{p-1}-1)=2v_2(p-1)+v_2(p+1)-1<2log_2(p-1)$, and now finite case check shall suffice.
This post has been edited 2 times. Last edited by VicKmath7, Jul 13, 2022, 6:38 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Assassino9931
1220 posts
#12 • 2 Y
Y by Dhruv777, cubres
It was about time that an application of the Lifting the Exponent Lemma appears at IMO! (And indeed, as VicKmath7
pointed out, this feels too much at home if ISL 2021 N5 is fresh in your mind.)

If $p=2$, then $b\geq 3$ is impossible by mod $3$ and only $a=b=2$ works. If $p=3$, then $b\geq 7$ is impossible by mod $7$ and only $a=3$, $b=4$ works. From now on, let $p\geq 5$. We shall repeatedly use the bound $n! \leq (\frac{n}{2})^n$ for $n\geq 6$ which follows by induction since $n+1 \leq \frac{(n+1)^{n+1}}{2n^n} \Leftrightarrow (1+\frac{1}{n})^n \geq 2$ holds by opening the brackets on the left and taking only the first two terms into account.

Now suppose $p$ does not divide $a$. Clearly $a=1$ is impossible. Observe that $p$ does not divide $b!$ and so $b<p$, whence $a^p \leq (p-1)! + p < p!$ and so $a<p$. If $b=1$, then $1 = a^p - p \geq 2^p - p \geq 2$, contradiction, so $b\geq 2$. Hence if $a < b$, then $a$ would divide both $a^p$ and $b!$ and hence $p$, contradiction as $p$ is prime. So $a>b$, thus (since $p>b \geq 2$) $b! > b^p - p > b^b - b$ (as $b^b(b^{p-b}-1) > 2^{p-b} - 1 \geq p-b$) and $(b-1)! > b^{b-1} - 1$ which is false since $b^{b-1} \geq (b-1)!$ for $b\geq 2$ (both sides have the same number of multipliers, the left-hand one's all are greater). Hence there are no solutions when $p$ does not divide $a$.

Next, consider $a = p^kx$ where $p$ does not divide $x$ and $k\geq 1$. Then $p^{kp}x^p = b! + p$. If $b\geq 2p$, then $b!$ and the left-hand side would be divisible by $p^2$ but $p$ would not be, so impossible. Hence $b<2p$ and so (using the above factorial bound) $b! + p \leq (2p-1)! + p \leq (\frac{2p-1}{2})^{2p-1} + p < p^{2p-1} + p < p^{2p}$. In particular, $p^{kp}x^p < p^{2p}$ and so $k\geq 2$ is impossible; also for $k=1$ we have $x<p$. Now if $x>1$, then either $x\leq b$ and hence $x$ divides $p^{p}x^{p} - b! = p$, impossible; or $x>b$ and so $p^pb^p < b! + p < p^{2p}$, i.e. $b<p$ -- but then in $p^{p}x^p = b! + p$ the term $b!$ would not be divisible by $p$ since $p$ is prime, contradiction.

So it remains to deal with (the most interesting) $p^p = b! + p$ for $p\geq 5$. Again $p \leq b < 2p$. Write the equation as $p(p^{p-1} - 1) = b!$. The right-hand side is divisible by $2^{\frac{p+1}{2}}$ since $b\geq p-1$ and each of $2$, $4$, $\ldots$, $p-1$ is even while for $p\geq 5$ we have the multiplier $4$ which is divisible by $4$. On the other hand, by the Lifting the exponent lemma for the prime $2$, the power of $2$ in the left-hand side is $2\nu_2(p-1) + \nu_2(p+1) - 1$. If $p\equiv 1 \pmod 4$, then we obtain $2\nu_2(p-1) \geq \frac{p+1}{2}$, whence $4\log_2 p > p$ and $p^4 > 2^p$, which fails for $p\geq 17$ by a straightforward induction. If $p\equiv 3 \pmod 4$, then we obtain $\nu_2(p+1) + 1 \geq \frac{p+1}{2}$, whence $2\log_2(p+1) \geq p-1$ and $(p+1)^2 \geq 2^{p-1}$ which fails by induction for $p\geq 11$.

Now we only have to check $p=5, 7, 13$. Well, $5^5 - 5 = 3120$ is divisible by $13$ but not by $9$, also $7^7 - 7$ is divisible by $7$ but not by $5$ and $13^{13} - 13$ is divisible by $61$ but not by $19$.
This post has been edited 3 times. Last edited by Assassino9931, Jul 13, 2022, 6:44 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
megarnie
5552 posts
#14 • 3 Y
Y by guywholovesmathandphysics, DEKT, cubres
The answer is $\boxed{(a,b,p)=(2,2,2), (3,4,3)}$. These work. It remains to show they are the only solutions.

If $a=1$, then $b!+p=1$, absurd. So assume $a>1$.

Claim: $b<2p$.
Proof: Suppose not. Then $p^2\mid b!$, which implies $\nu_p(b!+p)=1,$so it can't be a $p$th power. $\square$


Case 1: $a=p$.
Then\[b! = p^p-p = p(p^{p-1} - 1)\]If $p=2$, then $b=2$, giving $(2,2,2)$

If $p=3$, then $b=4$, giving $(3,4,3)$.

If $p=5$, then $b!=3120$, not possible.

If $p=7$, then $b! = 823536$, not possible.

Now assume $p>10$.

By Zsigmondy's, we can find a prime dividing $p^{p-1}-1$ that doesn't divide $p^k -1$ for any $k<p-1$. So in other words, there exists a prime $q$, such that the order of $p$ mod $q$ is $p-1$.

Claim: $q>2p-2$.
Proof: Assume not.

Since $p\ne q$, we have $p^{q-1}\equiv 1\pmod q$, so $p-1\mid q-1$.

By our assumption that $q\le 2p-2$, we have $q=p-1$, which is not prime. $\square$

Now, we have $q\mid p^{p-1}-1\mid p^p - p = b!$.

Since $q$ is prime, $b\ge q\ge 2p-1$. Because $b<2p$, this implies $b = 2p-1$.

So $p^p - p = (2p-1)!$.

Claim: $(2n-1)! > n^n$ for any positive integer $n>2$.
Proof: We have\[(2n-1)! = (n-1) ! \cdot n(n+1)(n+2)\cdots (2n-1)\]Notice how $n(n+1)(n+2)\cdots (2n-1)$ is the product of $n$ terms, each of which are at least $n$.

So $n(n+1)(n+2)\cdots (2n-1)\ge n^n$, which implies $(2n-1)! \ge (n-1)! n^n > n^n$, as desired. $\square$

Thus, $(2p-1)! > p^p > p^p - p$, contradiction.


Case 2: $b<p$.
Then we have $p\nmid b!$, so $p\nmid a$.

Subcase 2.1: $a\le b$.
Then $a\mid b!$, so $a\mid a^p - b! = p$, which implies $a=p$ (since $a>1$), absurd.

Subcase 2.2: $a>b$.
If $p=2$, then $b=1$, so $a^2 = 3$, not possible.

Now assume $p>2$.

Claim: For any positive integer $n>2$, we have $2^n > 2n$.
Proof: We do this by induction on $n$ (base cases $3,4$).

If $2^{n-1}> 2(n-1)$, then\[2^n = 2(2^{n-1}) > 4(n-1)>2n,\]as desired. $\square$

So $a^p \ge 2^p >2p$, which gives $b! > p$.

Claim: For any positive integer $n>2$, we have $n^n > 2\cdot n!$.
Proof: $2\cdot n!$ can be rewritten as $2\cdot 2\cdot 3\cdot 4\cdots n$. This is a product of $n$ terms, all of which are at most $n$, and at least one term is less than $n$.

So $2\cdot n!  = 2\cdot 2\cdot 3\cdot 4\cdots n<n^n$. $\square$

So\[a^p > b^p > b^b > 2\cdot b! > b! + p,\]contradiction.


Case 3: $b\ge p$ and $a\ne p$.
Since $p\mid b!$, we get $p\mid a$. Let $a=kp$ with $k>1$. Then\[(kp)^p = b! + p\]
Claim: For any positive integer $n>1$, we have $n^{2n} > (2n-1)! + n$.
Proof: First note that if $x$ and $y$ are positive, $x,y\ne n$, and $x+y = 2n$, then $xy<n^2$ by AM-GM.

So\begin{align*}
(2n-1)! = (1\cdot (2n-1)) \cdot (2\cdot (2n-2)) \cdots ((n-1)\cdot (n+1)) \cdot n\\ 
< (n^2)^{n-1}\cdot n \\
= n^{2n-1} \\
\le n^{2n}-n \\
\end{align*}$\square$


If $k\ge p$, then $(kp)^p \ge p^{2p} > (2p-1)! + p \ge b! + p$, contradiction. So $k<p$.

Let $q$ be a prime divisor of $k$. Since $q<p\le b$, we have $q\mid b!$. So $q\mid (kp)^p - b! = p$, which implies $q=p$, contradiction.




We have exhausted all cases, so the solutions described in the beginning are the only ones.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
blackbluecar
302 posts
#15 • 2 Y
Y by ThisNameIsNotAvailable, cubres
For $p=2,3$ then $(a,b,p)=(2,2,2)$ or $(3,4,3)$. So, assume $p>3$.

Rewite as $a^p-p=b!$

We claim $b \geq p$. Assume $b<p$. If we let $p_1,p_2,\ldots,p_n$ be the primes $\leq b$ then $p_i$ divides $b!=a^p-p$ for every $1 \leq i \leq n$. If $p_i$ divides $a$ then $p_i$ divides $(a)^p-(a^p-p)=p$ which is clearly contradiction. Thus, $a \geq p_{n+1}$. So, \[ b! = a^p-p \geq p_{n+1}^p-p \geq (p_{n+1})! \]Hence, $b \geq p_{n+1}$ which is contradiction.

Now notice that $p$ divides $b!=a^p-p$. Thus, $p$ divides $a$. We claim $b < 2p$. Indeed, notice that \[ 1=v_p(a^p-p)=v_p(b!) \]So, $b < 2p$ as desired.

Now, we claim $p$ is the smallest prime divisor of $a$. Indeed, assume some $q<p$ divides $a$. $q < p \leq b$ so $q$ divides $b!=a^p-p$. Thus, $q$ divides $p$ which is contradtion. Hence, if $a>p$ then it must be the case that $a \geq p^2$. So, \[ p^{2p}-p \leq a^p-p = b! < (2p)!\]Which cannot hold. So, $a=p$. plugging back we get \[ p^p-p=b! \]Now, by LTE we have \[ v_2(b!)=v_2(p^p-p) = 2v_2(p-1)+v_2(p+1)-1\]Notice that $p^p-p>p!$ so $b \geq p+1$. Thus, \[ v_2(b!) \geq v_2((p+1)!) > v_2(p+1)+v_2(p-1)+ v_2 \left ( \frac{p-1}{2} \right ) +1\]which is strictly larger than \[ 2v_2(p-1)+v_2(p+1)-1 \]which gives contradiction. $\blacksquare$
This post has been edited 1 time. Last edited by blackbluecar, Jul 13, 2022, 1:21 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
DottedCaculator
7326 posts
#16 • 5 Y
Y by asdf334, Mango247, Mango247, Mango247, cubres
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IAmTheHazard
5000 posts
#17 • 1 Y
Y by cubres
The answer is $(2,2,2)$ and $(3,4,3)$ which clearly work.
Clearly $b=1$ won't work for size reasons, so assume $b>1$. From AM-GM, for all $n$ we have $n!<(\tfrac{n+1}{2})^n<n^n$.
First suppose that $b<p$, so $p \nmid b!$ and thus $p \nmid a$. By our bound, we require $a<b$, else $a^p>a^b\geq b^b>b!$, but then $a \mid b!-a^p$ and not $p$: contradiction.
Thus suppose that $b \geq p$. Since $\nu_p(a^p-p)=1$, we must also have $b<2p$. Then we require $a<p^2$, else $a^p\geq (p^2)^p=p^{2p}\geq (\tfrac{b+1}{2})^{2p}>(\tfrac{b+1}{2})^b>b!$. Letting $a=kp$ where $k<p$, it follows that $k \mid a^p-b!$ but not $p$ unless $k=1$, so we reduce to the case where $a=p$.
In this case, we count $\nu_2$: $\nu_2(p^p-p)=\nu_2(p^{p-1}-1)=\nu_2(p^2-1)+\nu_2(\tfrac{p-1}{2})=\nu_2(\tfrac{(p-1)^2(p+1)}{2})\leq \log_2(\tfrac{(p-1)^2(p+1)}{2})$ by exponent lifting, and $\nu_2(b!)\geq b-\log_2(b+1)\geq p-\log_2(p+1)$ by Legendre's. Thus we require
$$p-\log_2(p+1)\leq \log_2(\tfrac{(p-1)^2(p+1)}{2}) \implies 2^p \leq \frac{(p-1)^2(p+1)^2}{2}.$$This fails for $p=15$ (yes this isn't a prime, no it doesn't matter), and by derivatives it also fails for all $p>15$, so we reduce to a finite case check. From this it's easy to get that the solutions provided are the only ones—instead of computing $p^p-p$, find a divisor of it that can't divide $b$ for each $p$. $\blacksquare$

The actual expressions are probably wrong but it doesn't really matter
This post has been edited 1 time. Last edited by IAmTheHazard, Jul 13, 2022, 3:36 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math90
1474 posts
#18 • 1 Y
Y by cubres
Answer. $(a,b,p)=(2,2,2)$ and $(a,b,p)=(3,4,3)$. Those can be easily verified as solutions.

Since $a^p=b!+p>1$ then $a>1$. Moreover $p\ge 2$ so $a^p\ge 2^p\ge p+2$. Hence $b\ge 2$.

If $2\le b<p$, pick any prime divisor $q$ of $b!+p$. Hence $q>b$ and $q\mid a$. It can be proved by induction that $x^y\ge x+y$ for integers $x,y\ge 2$. Moreover for integers $x,y\ge 2$ we have $xy=(x-1)(y-1)-1+x+y\ge x+y$ so
$$b^p=b^{b-1}b^{p-b+1}>b!p\ge b!+p=a^p\ge q^p,$$contradiction.

If $b\ge p$ then $p\mid b!+p=a^p$ so $p\mid a$. Note that $v_p(a^p-p)=1$ so $b<2p$. Hence
\begin{align*}
a^p&\le (2p-1)!+p\\
&<(1)(2p-1)(2)(2p-2)\cdots(p-1)(p+1)p+p\\
&\le p[(p^2-1)^{p-1}+1]\\
&\le p^{2p-1}.
\end{align*}Hence $a<p^2$. Moreover, if there exists a prime $q<p$ which divides $a$ then $\gcd(q,b!+p)=1$ because $b\ge p$. But $q\mid b!+p$, contradiction. Hence $a=p$ so $p^p-p=b!$.
If $p=2$ we see that $b=2$ so we get the solution $\boxed{(a,b,p)=(2,2,2)}$. So now assume $p\ge 3$. By LTE and the fact that $\gcd(p-1,p+1)=2$ we obtain
\begin{align*}
v_2(p^p-p)&=v_2(p^2-1)+v_2\left(\frac{p-1}{2}\right)\\
&=\max\left(2v_2(p-1),v_2(p+1)+1\right)\\
&\le\max\left(2\log_2(p-1),\log_2(p+1)+1\right)\\
&=2\log_2(p-1).
\end{align*}Moreover
$$v_2(b!)\ge v_2(p!)=p-s_2(p)\ge p-\log_2(p+1).$$Hence $2\log_2(p-1)\ge p-\log_2(p+1)$. Equivalently $(p-1)(p^2-1)\ge 2^p$. Therefore $2^p<p^3$ so $p<10$. We are left to check $p=3,5,7$. If $p=3$ we obtain a solution $\boxed{(a,b,p)=(3,4,3)}$. If $p=5$ then $p^p-p=5^5-5=3120$ and $6!<3120<7!$. Hence no solution in this case. If $p=7$ then
$$p^p-p=7^7-7\equiv 2^7-2=126\equiv 1\pmod{5}$$Hence $5\nmid 7^7-7$ so for a solution we need $7^7-7\le 4!$, but $7^7-7>7^2>4!$. Therefore there is no solution also in this case.
This post has been edited 10 times. Last edited by math90, Jul 14, 2022, 5:55 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
BOBTHEGR8
272 posts
#20 • 1 Y
Y by cubres
mathisreaI wrote:
Find all triples $(a,b,p)$ of positives integers with $p$ prime and $$a^p=b!+p$$
Solution-
Claim 1 $b\geq p$
If possible let $b<p$.
If $a\leq b$, then $a|b! \implies a|p$, but $a\leq b<p$ gives $a=1$ which is not possible.
Hence $a>b$, so $$a^p - p = (a-1+1)^p-p > (a-1)^p \geq b^p > b!$$Which is a contradiction, hence $b\geq p$

Claim 2 $a = p$
Going mod $p-1$, we have $a^p \equiv 1$, hence order of $a$ is $1$ or $p$. But order must divide $\phi(p-1)<p$ and hence it is $1$.
Moreover $b\geq p \implies p|b! \implies p|a \implies a\equiv p \text{ mod} (p^2-p)$. Hence if $a>p$ then $a\geq p^2$.
$p^2|a^p \implies p^2$ does not divide $a^p - p = b!$ and hence $b<2p$.
Now $b!+p \leq (2p-1)! + p < 2 (2p-1)! < 2 \{(2p-1)(1)\}\{(2p-2)(2)\}\cdots \{(p+1)(p-1)\}\{p\} < 2\{p^2\}\{p^2\}\cdots \{p^2\}\{p\}  = 2p^{2p-1}< p^{2p} < a^p$ .
Which is a contradiction and hence $a = p$.

So we have reduced the problem to $$b! = p^p-p$$Claim 3 The above equation has no solution for $p>5$
$$\nu_2(p^p-p) = \nu_2(p^{p-1}-1) = 2\nu_2(p-1)$$For prime $p\geq 7$ the following are distinct $p-1,\frac{p-1}{2} , 4, 2$ and hence their product divides $b!$
$$4(p-1)^2|b! \implies \nu_2(b!) >  2\nu_2(p-1)$$Which is a contradiction.

Now we can check that $p=2,3$ indeed gives two solutions with $b=2,4$ respectively.
Hence all the solution of the given equation are
$$(a,b,p) = (2,2,2) \text{ or } (3,4,3) $$
This post has been edited 1 time. Last edited by BOBTHEGR8, Jul 14, 2022, 9:37 AM
Z K Y
G
H
=
a