Stay ahead of learning milestones! Enroll in a class over the summer!

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
k i Adding contests to the Contest Collections
dcouchman   1
N Apr 5, 2023 by v_Enhance
Want to help AoPS remain a valuable Olympiad resource? Help us add contests to AoPS's Contest Collections.

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


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


More specifically:

For new threads:


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

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


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

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


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


For answers to already existing threads:


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

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



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


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

The above rules will be applied from next monday (5. march of 2007).
Feel free to discuss on this here.
49 replies
ZetaX
Feb 27, 2007
NoDealsHere
May 4, 2019
Inspired by Czech-Polish-Slovak 2017
sqing   2
N 11 minutes ago by lbh_qys
Let $x, y$ be real numbers. Prove that
$$\frac{(xy+1)(x + 2y)}{(x^2 + 1)(2y^2 + 1)} \leq \frac{3}{2\sqrt 2}$$$$\frac{(xy+1)(x +3y)}{(x^2 + 1)(3y^2 + 1)} \leq \frac{2}{ \sqrt 3}$$$$\frac{(xy - 1)(x + 2y)}{(x^2 + 1)(2y^2 + 1)} \leq \frac{1}{\sqrt 2}$$$$\frac{(xy - 1)(x + 3y)}{(x^2 + 1)(3y^2 + 1)} \leq \frac{\sqrt 3}{2}$$
2 replies
sqing
an hour ago
lbh_qys
11 minutes ago
Inequality by Po-Ru Loh
v_Enhance   55
N 15 minutes ago by ethan2011
Source: ELMO 2003 Problem 4
Let $x,y,z \ge 1$ be real numbers such that \[ \frac{1}{x^2-1} + \frac{1}{y^2-1} + \frac{1}{z^2-1} = 1. \] Prove that \[ \frac{1}{x+1} + \frac{1}{y+1} + \frac{1}{z+1} \le 1. \]
55 replies
1 viewing
v_Enhance
Dec 29, 2012
ethan2011
15 minutes ago
Serbian selection contest for the BMO 2025 - P4
OgnjenTesic   1
N 24 minutes ago by WallyWalrus
Let $a_1, a_2, \ldots, a_8$ be real numbers. Prove that
$$\sum_{i=1}^{8} \left( a_i^2 + a_i a_{i+2} \right) \geq \sum_{i=1}^{8} \left( a_i a_{i+1} + a_i a_{i+3} \right),$$where the indices are taken modulo 8, i.e., $a_9 = a_1$, $a_{10} = a_2$, and $a_{11} = a_3$. In which cases does equality hold?

Proposed by Vukašin Pantelić and Andrija Živadinović
1 reply
1 viewing
OgnjenTesic
Apr 7, 2025
WallyWalrus
24 minutes ago
Projective training on circumscribds
Assassino9931   1
N 25 minutes ago by VicKmath7
Source: Bulgaria Balkan MO TST 2025
Let $ABCD$ be a circumscribed quadrilateral with incircle $k$ and no two opposite angles equal. Let $P$ be an arbitrary point on the diagonal $BD$, which is inside $k$. The segments $AP$ and $CP$ intersect $k$ at $K$ and $L$. The tangents to $k$ at $K$ and $L$ intersect at $S$. Prove that $S$ lies on the line $BD$.
1 reply
Assassino9931
Yesterday at 10:17 PM
VicKmath7
25 minutes ago
Orthocenter config once again
Assassino9931   7
N 25 minutes ago by VicKmath7
Source: Bulgaria National Olympiad 2025, Day 2, Problem 4
Let \( ABC \) be an acute triangle with \( AB < AC \), midpoint $M$ of side $BC$, altitude \( AD \) (\( D \in BC \)), and orthocenter \( H \). A circle passes through points \( B \) and \( D \), is tangent to line \( AB \), and intersects the circumcircle of triangle \( ABC \) at a second point \( Q \). The circumcircle of triangle \( QDH \) intersects line \( BC \) at a second point \( P \). Prove that the lines \( MH \) and \( AP \) are perpendicular.
7 replies
Assassino9931
Tuesday at 1:53 PM
VicKmath7
25 minutes ago
Angle EBA is equal to Angle DCB
WakeUp   6
N 40 minutes ago by Nari_Tom
Source: Baltic Way 2011
Let $ABCD$ be a convex quadrilateral such that $\angle ADB=\angle BDC$. Suppose that a point $E$ on the side $AD$ satisfies the equality
\[AE\cdot ED + BE^2=CD\cdot AE.\]
Show that $\angle EBA=\angle DCB$.
6 replies
WakeUp
Nov 6, 2011
Nari_Tom
40 minutes ago
if xy+xz+yz+2xyz+1 prove that...
behdad.math.math   5
N 41 minutes ago by Sadigly
if xy+xz+yz+2xyz+1 prove that x+y+z>=3/2
5 replies
behdad.math.math
Sep 25, 2008
Sadigly
41 minutes ago
no. of divisors of the form
S_14159   0
an hour ago
Source: idk
If $P=2^5 \cdot 3^6 \cdot 5^4 \cdot 7^3$ then number of positive integral divisors of $``P"$

(A) of form $(2 n+3), n \in \mathbb{N}$, is $=138$
(B) of form $(4 n+1), n \in \mathbb{W}$, is $=70$
(C) of form $(6 n+3), n \in \mathbb{W}$, is $=120$
(D) of form $(4 n+3), n \in \mathbb{W}$, is $=56$

(more than one option may be correct)
0 replies
S_14159
an hour ago
0 replies
max n with n times n square are black
NicoN9   0
an hour ago
Source: Japan Junior MO Preliminary 2022 P5
Find the maximum positive integer $n$ such that for $45\times 45$ grid, no matter how you paint $2022$ unit squares black, there exists $n\times n$ square with all unit square painted black.
0 replies
NicoN9
an hour ago
0 replies
BDE tangent to EF
NicoN9   0
an hour ago
Source: Japan Junior MO Preliminary 2022 P4
Let $ABC$ be a triangle with $AB=5$, $BC=7$, $CA=6$. Let $D, E$, and $F$ be points lying on sides $BC, CA, AB$, respectively. Given that $A, B, D, E$, and $B, C, E, F$ are cyclic respectively, and the circumcircle of $BDE$ are tangent to line $EF$, find the length of segment $AE$.
0 replies
NicoN9
an hour ago
0 replies
Maximum number of m-tastic numbers
Tsukuyomi   30
N an hour ago by cursed_tangent1434
Source: IMO Shortlist 2017 N4
Call a rational number short if it has finitely many digits in its decimal expansion. For a positive integer $m$, we say that a positive integer $t$ is $m-$tastic if there exists a number $c\in \{1,2,3,\ldots ,2017\}$ such that $\dfrac{10^t-1}{c\cdot m}$ is short, and such that $\dfrac{10^k-1}{c\cdot m}$ is not short for any $1\le k<t$. Let $S(m)$ be the set of $m-$tastic numbers. Consider $S(m)$ for $m=1,2,\ldots{}.$ What is the maximum number of elements in $S(m)$?
30 replies
Tsukuyomi
Jul 10, 2018
cursed_tangent1434
an hour ago
interesting ineq
nikiiiita   6
N an hour ago by KhuongTrang
Source: Own
Given $a,b,c$ are positive real numbers satisfied $a^3+b^3+c^3=3$. Prove that:
$$\sqrt{2ab+5c^{2}+2a}+\sqrt{2bc+5a^{2}+2b}+\sqrt{2ac+5b^{2}+2c}\le3\sqrt{3\left(a+b+c\right)}$$
6 replies
nikiiiita
Jan 29, 2025
KhuongTrang
an hour ago
Prove that x1=x2=....=x2025
Rohit-2006   7
N an hour ago by Fibonacci_math
Source: A mock
The real numbers $x_1,x_2,\cdots,x_{2025}$ satisfy,
$$x_1+x_2=2\bar{x_1}, x_2+x_3=2\bar{x_2},\cdots, x_{2025}+x_1=2\bar{x_{2025}}$$Where {$\bar{x_1},\cdots,\bar{x_{2025}}$} is a permutation of $x_1,x_2,\cdots,x_{2025}$. Prove that $x_1=x_2=\cdots=x_{2025}$
7 replies
Rohit-2006
Yesterday at 5:22 AM
Fibonacci_math
an hour ago
Inspired by old results
sqing   1
N an hour ago by sqing
Source: Own
Let $a ,b,c \geq 0 $ and $a+b+c=1$. Prove that
$$\frac{1}{2}\leq \frac{ \left(1-a^{2}\right)^2+2\left(1-b^{2}\right) \left(1-c^{2}\right) }{\left(1+a\right)\left(1+b\right)\left(1+c\right)}\leq 1$$$$1 \leq \frac{\left(1-a^{2}\right)^{2}+2\left(1-b^{2}\right) +\left(1-c^{2}\right)^{2}}{\left(1+a\right)\left(1+b\right)\left(1+c\right)}\leq \frac{3}{2}$$
1 reply
sqing
2 hours ago
sqing
an hour ago
Factorial: n!|a^n+1
Nima Ahmadi Pour   66
N Apr 5, 2025 by cursed_tangent1434
Source: IMO Shortlist 2005 N4, Iran preparation exam
Find all positive integers $ n$ such that there exists a unique integer $ a$ such that $ 0\leq a < n!$ with the following property:
\[ n!\mid a^n + 1
\]

Proposed by Carlos Caicedo, Colombia
66 replies
Nima Ahmadi Pour
Apr 24, 2006
cursed_tangent1434
Apr 5, 2025
Source: IMO Shortlist 2005 N4, Iran preparation exam
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Tyx2019
22 posts
#57
Y by
The answers are $n=1,n=2$ and $n$ prime.

First settle trivial case of $n$ even. If $n$ is even, -1 must be a quadratic residue mod all primes $<n$. So then if $n\geq 3$ 2 is a quadratic residue mod 3 which is wrong.

Now we have $n$ is odd. If $n$ is not prime and not 1, then it can be split into $pr$ where $p$ is prime and $r\geq 2$. Hence we have $2p\le n$, so $v_p(n!)\geq 2$. Let $k=v_p(n!)$. Now since such a solution is unique, and there is at least one solution($a=p!-1$), then if there is more than 1 solution to $a^n\equiv -1$ mod $p^k$ in the range $[0,p^k-1]$ then there are more than 2 solutions(by CRT).

Let us choose a primitive root $g$ of $p^k$. Then $g^{\frac{p^k-p^{k-1}}{2}}\equiv -1 \mod{p}$, and we only need to show that $xn \equiv \frac{p^k-p^{k-1}}{2} \mod{p^k-p^{k-1}}$ has more than 1 solution, which is obvious.

Now if $n$ is prime, it works. Firstly if there is only one solution for each $p$ for $xn \equiv \frac{p^k-p^{k-1}}{2} \mod{p^k-p^{k-1}}$ if $k=v_p(n)$ we are done. This is because by CRT there will only be one solution mod $n!$. So, this is obvious for primes $<n$ since $n$ is coprime to $p^k-p^{k-1}$(coprime to $p$ and $p-1$). Clearly for $p=n$, $n$ is coprime with $n-1$ so we are done, since $v_n(n!)=1$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
KI_HG
157 posts
#58
Y by
One can use Hensel to generate another solution.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
OronSH
1728 posts
#59 • 1 Y
Y by mathmax12
The answer is all primes and $1$ which is trivial. For evens $>2$ we have $n! \equiv 0 \pmod 4,$ so $a^n \equiv 3 \pmod 4$ but is a square, impossible. We check $n=2$ works.

If $n$ is odd and is a prime $p$ then the order of $a \pmod p$ must divide $2p$ but not $p$ so it must be either $2$ or $2p.$ But it must also divide $\varphi(p!)$ so it is not $2p.$ Thus $a^2 \equiv 1 \pmod p$ so $a^p \equiv a \pmod p$ so $a \equiv -1 \pmod p$ and $a=p!-1$ is the only solution which works.

If $n$ is odd and composite, we take $a=(n-1)!-1$ and since $n \mid (n-1)!$ we have $n! \mid (n-1)!^2$ so when we expand all terms of $a^n$ using the binomial formula all terms must be divisible by $n!$ except for the last two, but the second to last term is $(n-1)! \cdot n = n!$ so it is also divisible by $n!$ so $a^n \equiv -1 \pmod{n!}$ and $n! \mid a^n+1.$ However we can also just take $a=n!-1$ so these don't work and we are done.
This post has been edited 2 times. Last edited by OronSH, Dec 7, 2023, 3:08 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AlanLG
241 posts
#60
Y by
:coolspeak:
$\textcolor{blue}{\text{Claim } n \hspace{0.2cm}\text{even doesn´t work}}$
We would have for some $p\mid n!$ prime $p\mid a^n+1$ so by Fermat Christmas Theorem $p=2$ or $p\equiv 1\pmod 4$

$\textcolor{blue}{\text{Claim } n \hspace{0.2cm}\text{odd and composite doesn´t work}}$
As $n$ odd $n\mid (n!-1)^n-1$ so $a=n!-1$ works
One way to found a contradiction

Another way
$\textcolor{blue}{\text{Claim } p \hspace{0.2cm}\text{prime work}}$
Let $q\mid p! \hspace{0.1cm}$ prime, so $a^{2p}\equiv 1\pmod q$ and $a^{q-1}\equiv 1\pmod q$ so $\operatorname{Ord}_q(a)\mid 2\gcd\left(p,\frac{q-1}{2}\right)$ so $\operatorname{Ord}_q(a)=2$ thus $q\mid a+1$, then
$$\nu_q\left(a^p+1\right)=\nu_q(a+1)+\nu_q(p)=\nu_q(a+1)$$So $p!\mid a+1$ then $a=p!-1$ is the unique solution here
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
joshualiu315
2513 posts
#61
Y by
The answer are the $\boxed{\text{primes}}$. If $n$ is even and greater than $2$, we have

\[a^n \equiv -1 \pmod{n!} \iff a^n \equiv -1 \pmod{4},\]
which is impossible.

Manually check that $n=2$ is valid, so assume $n$ is odd henceforth.

If $n$ is prime, we have

\[a^n \equiv -1 \pmod{n!}\]\[\implies a^{2n} \equiv 1 \pmod{n!}.\]
Hence, the order of $a$ modulo $n!$ is divisible by $2n$ but not $n$. This means it is either $2$ or $2n$. Consider a prime $p \mid n!$.

We have

\[a^{p-1} \equiv 1 \pmod{p},\]
so the order of $a$ modulo $n!$ is $\gcd(p-1, 2n) = 2$. This means that

\[a^n \equiv a \equiv -1 \pmod{p!},\]
fixing $a=p!-1$.

If $n$ is odd and composite, $a=n!-1$ still is valid, but we claim $(n-1)!-1$ will also be valid, violating the uniqueness of $a$. Note that

\[\nu_{p}(((n-1)!-1)^n+1) = \nu_{p}((n-1)!) + \nu_{p}(n) = \nu_p(n!). \]
We are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shendrew7
793 posts
#62
Y by
We claim the answer is $\boxed{\text{all primes}}$.
  • For all primes $n=p$, we claim the desired unique integer is $p!-1$, which clearly works. To prove this, take an arbitrary prime $q<p$, and note we require
    \[a^p \equiv -1 \pmod q \implies \operatorname{ord}_qa \mid 2p, q-1 \implies \operatorname{ord}_qa = 2 \implies q \mid a+1.\]We conclude using LTE to get
    \[v_q(p!) \leq v_q(a^p+1) = v_q(a+1) \implies p! \mid a+1 \implies a=p!-1.\]
  • For all evens other than 2, notice that if $m$ works, $n!-m$ also works (and clearly $\tfrac{n!}{2}$ always fails), giving us two distinct values. For all odds, we simply take $n!-1$ and $(n-1)!-1$. $\blacksquare$
This post has been edited 1 time. Last edited by shendrew7, Mar 3, 2024, 2:23 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Marius_Avion_De_Vanatoare
54 posts
#63
Y by
Nice training problem, the answer are all prime numbers.
First note that if $n$ is even, for a solution $a$, $n!-a$ is also a solution, thus $a=\frac{n!}{2}$, which only works for $n=2$.
For odd $n$ the only solution should be $n!-1$, for composite $n$, however take $\frac{n!}{p}-1$, for some prime $p$ dividing $n$, and see that for example by $LTE$, $v_p(a^n+1)=v_p(a+1)+v_p(n) \ge v_p(n!)-1+1=v_p(n!)$, or just factor out and see that the second paranthesis is also divisible by $p$.
Now for prime $n$, any prime dividing $a^n+1$ divides $a^{2n}-1$, thus it's order divides $2n$, but as it also divides $p-1$, for primes $p\le n$ we get that it divides $2$, meaning together with $p \mid a^n+1$, that $p \mid a+1$ for any prime $p\le n$, and using $LTE$ or factorization again it is easy to see that $\frac{a^n+1}{a+1}$ does not contribute with any prime power, thus we get $n! \mid a+1$, which is the desired conclusion.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
SenorSloth
37 posts
#64
Y by
We claim that the answer is all prime $n$, with $a=n!-1$ the unique value of $a$ in those cases.

First, we prove that this works. For $n=2$, $a=1$ is the unique integer that works. For larger $n$, assume that $n!=p_1^{e_1}\cdot p_2^{e_2}\dots p_k^{e_k}\cdot n$, where $p_1$ through $p_k$ are the primes less than $n$. For any prime $p<n$, we will show that $p^k\mid a^n+1$ implies that $a\equiv -1 \pmod{p^k}$. The order of $a\pmod{{p_i}^{e_i}}$ must divide $\gcd((p-1)p^{k-1},2n)$, which equals $2$ since $n$ is a prime greater than $p$. The order can't be $1$, so it must be $2$, which then implies that $a\equiv -1 \pmod{{p_i}^{e_i}}$. Then for the prime $n$, since $a^n\equiv a\pmod{n}$ by FLT, for $n\mid a^n+1$ we require $a\equiv -1 \pmod{n}$. Then by CRT over all of the prime powers dividing $n!$, there is only one solution.

Now we must prove that other numbers do not work. Even values of $n>2$ fail since $4\mid n!$ but $a^n+1$ can only be $1$ or $2\pmod{4}$. For odd composite $n$, consider a prime $p$ dividing $n$, and let $k$ be the maximum value such that $p^k\mid n!$. If we let $a\equiv -1\pmod{p^{k-1}}$, we can apply LTE to get that $\nu_p(a^n+1)=\nu_p(a+1)+\nu_p(n)\geq k-1 +\nu_p(n)$. Since $p\mid n$, $\nu_p(n)\geq 1$, so $\nu_p(a^n+1)\geq k$ and $p^k\mid a^n+1$. Thus there are $p$ different values $\pmod{p^k}$ that are $-1\pmod{p^{k-1}}$, each of which could be used when applying CRT over all of the prime powers. This tells us that the number of solutions will be a multiple of $p$, but this can clearly never be $1$. Thus prime $n$ are the only solutions, as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AshAuktober
974 posts
#65
Y by
The solution set is $\boxed{n = 1 \text{ and } n \text{ prime.}}$
Lemma 1: $n \in \{1, 2\}$ work trivially.

Lemma 2: If $n$ works and is even, $n = 2$.
Proof: Assume otherwise, letting $n = 2k$. Then $3 \mid n! \mid (a^k)^2 + 1$, impossible by Fermat's Christmas Theorem.

Lemma 3: All odd composite numbers don't work.
Proof: Same as anantmudgal09, so copied from there:
Let $n$ be an odd composite number. Let $r$ be a prime factor of $n$. We show that there is a number $a$ which works other than $n!-1$ which obviously does. Now, ofc we get by LTE; $v_r(a^n+1)=v_r(a+1)+v_r(n) \ge v_r(n!)$ and so we set $a \equiv -1 ( \bmod r^{v_r((n-1)!)})$ for all $r \mid n$. Otherwise, we set $a \equiv -1 (\bmod r^{v_r(n!)})$ for all $r$ prime divisors of $n!$ but not $n$. This clearly gives a working $a$ and infact by CRT, generates at least $n$ such $a$'s in the range $[0,n!)$ and we conclude that more than one such number exist. This proves that odd composites are failed by the proposition.

Lemma 4: All odd primes work.
Proof: Attached below.
Due to the above, the solution set is confirmed. $\square$
Attachments:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
kotmhn
57 posts
#67
Y by
\begin{answer}
Only primes and 1 work as the value of $n$
\end{answer}
\begin{proof}
\textbf{Prime $ n$ gives unique solution}

let $p! = p_1^{\alpha_1} \dots p_k^{\alpha_k}$
so we need solution to $a^p \equiv -1 \pmod{p_i^{\alpha_i}}$
Clearly we have that $\gcd(p,p_i^{\alpha_i})=1$ then clearly $a^p$ is a bijection and we are done, as it gives out unique values for each
$p_i^{\alpha_i}$ and then we apply CRT to finish.


\textbf{Composite $n$ do not work}

let $n! =p^{\nu_p(n!) }\cdot k$ where p is chosen such that $p \mid n \Rightarrow n=p\cdot t$
\begin{claim}
if a solution to $a^n \equiv -1 \pmod{p^{\nu_p(n!)}}$ multiple solutions exist.
\end{claim}
\begin{proof}
So we need $a^{pt} \equiv b^{pt} \equiv -1 \pmod{p^{\nu_p(n!) }}$ to have solutions in distinct $a,b$.
clearly $a,b$ have to be co prime to $p_i$ and getting $a^p \equiv b^p \pmod{p^{\nu_p(n!) }}$ works as i can raise both to $t$ therefore we need
\begin{center}
$\left(\frac{a}{b} \right)^{p} \equiv 1 \pmod{p^{\nu_p(n!)}}$
\end{center}
then clearly taking primitive roots we seen that this has multiple solutions.
\end{proof}
this clearly shows that composite $n$ do not work.
\end{proof}
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
EpicBird08
1743 posts
#68
Y by
The answer is all prime $n.$ (And $1$ as well. bruhhhhh)

First, we verify that the only even $n$ that works is $n = 2.$ For $n = 2,$ only $a = 1$ works, while for even $n > 2,$ if $a$ works, then so does $n! - a,$ and since $\frac{n!}{2}$ clearly doesn't work, we get an even number of solutions. Henceforth assume that $n$ is odd.

Verification that odd primes $p$ work: We want $a^p \equiv -1 \pmod{p!},$ or $(-a)^p \equiv 1 \pmod{p!}.$ We want to show that there is exactly one value of $a$ which satisfies this, namely $a = n!-1.$ This is equivalent to showing that the order of any number modulo $p!$ cannot be $p.$ In fact, $p \nmid \phi(p!)$ because $$\phi(p!) = p! \cdot \prod_{q < p, q \text{ is prime}} \left(1 - \frac{1}{q}\right)$$has all of its prime factors less than $p.$ This means that if $(-a)^p \equiv 1 \pmod{p!},$ then $-a \equiv 1 \pmod{p!},$ giving exactly one solution, as required.

Proof that odd composites $n$ don't work: Once again we would like to solve $(-a)^n \equiv 1 \pmod{n!}.$ For simplicity let $b = n!-a,$ so that we want $b^n \equiv 1 \pmod{n!}.$ Obviously $b = 1$ satisfies this. The key claim is that $b = (n-1)! + 1$ also satisfies this, which immediately shows that $a$ is not unique. To see why. write $$b^n - 1 = (b-1)(b^{n-1} + b^{n-2} + \dots + b + 1) = ((n-1)! + 1 - 1)(b^{n-2} + \dots + b + 1).$$The left factor becomes $(n-1)!,$ and $(n-1)! \equiv 0 \pmod{n}$ since $n$ is composite, so the right factor is $1^{n-2} + \dots + 1 + 1 \equiv 0 \pmod{n}.$ So the entire product is divisible by $n!,$ implying that $a = (n-1)! + 1$ works, as claimed. Thus all composite $n$ don't work.

Therefore, only prime $n$ work, as desired.

Remark: A simpler proof that even $n > 2$ don't work is that $n! \equiv 0 \pmod{3}$ while $a^n + 1 \equiv 1,2 \pmod{3}.$
This post has been edited 2 times. Last edited by EpicBird08, Oct 13, 2024, 10:47 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
L13832
258 posts
#69 • 1 Y
Y by alexanderhamilton124
It is easy to see that $\boxed{n=1}$ work. We consider the case for $n$ even, so $a^n+1\equiv 2\pmod{3}$ so $\boxed{n=2}$.
If $n$ is odd we consider $2$ cases, for odd primes and odd composites, here $a=n!-1$ satisfies the conditions of the problem, now we check for $a=(n-1)!-1$, $((n-1)!-1)^n+1\equiv -1+1 \equiv 0\pmod{n!} $, here we used the fact that $((n-1)!)^r\equiv 0\pmod{n!}, r\geq 2$, but note that this contradicts the uniqueness of $a$.
If $n$ is an odd prime $\text{ord}_{n!}(a)=2, 2n$, if $\text{ord}_{n!}(a)=2$ then $n!\mid a+1$ so a valid construction for $a$ can be $n!-1$. Hence $\boxed{\text{all odd primes n}}$ work. For $\text{ord}_{n!}(a)=2n$ we let $p$ be a prime such that $p\mid n!$, then $\text{ord}_{n}(a)\mid p-1$ which is simply not possible.
This post has been edited 1 time. Last edited by L13832, Oct 31, 2024, 8:29 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Vedoral
89 posts
#70
Y by
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.
SimplisticFormulas
89 posts
#71 • 1 Y
Y by teomihai
cool nt
soln
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cursed_tangent1434
578 posts
#72 • 1 Y
Y by ihategeo_1969
Cool Problem! We claim that the answer is exactly the primes. We first show that all primes indeed do work.

When $n=2$ clearly $a=1$ is the only solution so the result is clear. When $n=p$ is an odd prime,
\[(p!-1)^p+1 \equiv (-1)^p +1 \equiv 0 \pmod{p!}\]so $a=p!-1$ is a solution. Now, say $x$ is a positive integer in the given range such that $p! \mid x^p+1$. Then,
\[x^p \equiv -1 \pmod{p!}\]So $\text{ord}_{p!}x \mid 2p$ but $\text{ord}_{p!}x \nmid p$. Thus, $\text{ord}_{p!}x=2$ or $\text{ord}_{p!}x=2p$. However, $p \nmid \varphi(p!)$ which is a clear contradiction if $\text{ord}_{p!}x = 2p \mid \varphi(p!)$. Thus, $\text{ord}_{p!}x=2$ which implies that $x^2 \equiv 1 \pmod{p!}$. Hence,
\[0 \equiv x^p+1 \equiv x+1 \pmod{p!}\]which implies that $x = p!-1$ as desired.

Now, note that all even $n>2$ do not work since if $n! \mid a^n+1$ then $n! \mid (n!-a)^n+1$ as well. These coincide if and only if $a = \frac{n!}{2}$ which is clearly impossible since then $\gcd(a,n)>1$ contradicting the fact that $n! \mid a^n+1$. Thus, all even $n$ have zero or at least two working values for $a$ which is a contradiction.

We finally handle odd composite integers $n$. Once again, $a=n!-1$ satisfies the desired divisibility. Note that
\[((n-1)!-1)^n+1 \equiv (-1)^n+1 \equiv 0 \pmod{(n-1)!}\]Thus, we only need to look at primes dividing $n$. Here, say odd $p \mid n$. Since $n$ is not a prime $p \le n-1$. Thus, $p \mid (n-1)!$. Now, by Lifting the Exponent Lemma we have
\[\nu_p(((n-1)!-1)^n+1) = \nu_p((n-1)!)+\nu_p(n)=\nu_p(n!)\]which implies that $n! \mid ((n-1)!-1)^n+1$ which contradicts uniqueness.
Z K Y
N Quick Reply
G
H
=
a