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

G
Topic
First Poster
Last Poster
k a May Highlights and 2025 AoPS Online Class Information
jlacosta   0
May 1, 2025
May is an exciting month! National MATHCOUNTS is the second week of May in Washington D.C. and our Founder, Richard Rusczyk will be presenting a seminar, Preparing Strong Math Students for College and Careers, on May 11th.

Are you interested in working towards MATHCOUNTS and don’t know where to start? We have you covered! If you have taken Prealgebra, then you are ready for MATHCOUNTS/AMC 8 Basics. Already aiming for State or National MATHCOUNTS and harder AMC 8 problems? Then our MATHCOUNTS/AMC 8 Advanced course is for you.

Summer camps are starting next 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 an enriching 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][*]May 9th, 4:30pm PT/7:30pm ET, Casework 2: Overwhelming Evidence — A Text Adventure, a game where participants will work together to navigate the map, solve puzzles, and win! All are welcome.
[*]May 19th, 4:30pm PT/7:30pm ET, What's Next After Beast Academy?, designed for students finishing Beast Academy and ready for Prealgebra 1.
[*]May 20th, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 1 Math Jam, Problems 1 to 4, join the Canada/USA Mathcamp staff for this exciting Math Jam, where they discuss solutions to Problems 1 to 4 of the 2025 Mathcamp Qualifying Quiz!
[*]May 21st, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 2 Math Jam, Problems 5 and 6, Canada/USA Mathcamp staff will discuss solutions to Problems 5 and 6 of the 2025 Mathcamp Qualifying Quiz![/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
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
Wednesday, May 7 - Aug 20
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Sunday, 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
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
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
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
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

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

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

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

Precalculus
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
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
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

AIME Problem Series A
Thursday, May 22 - Jul 31

AIME Problem Series B
Sunday, Jun 22 - Sep 21

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
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
May 1, 2025
0 replies
integer functional equation
ABCDE   151
N 7 minutes ago by youochange
Source: 2015 IMO Shortlist A2
Determine all functions $f:\mathbb{Z}\rightarrow\mathbb{Z}$ with the property that \[f(x-f(y))=f(f(x))-f(y)-1\]holds for all $x,y\in\mathbb{Z}$.
151 replies
ABCDE
Jul 7, 2016
youochange
7 minutes ago
Inspired by xytunghoanh
sqing   0
12 minutes ago
Source: Own
Let $ a,b,c\ge 0, a^2 +b^2 +c^2 =3. $ Prove that
$$ \sqrt 3 \leq a+b+c+ ab^2 + bc^2+ ca^2\leq 6$$Let $ a,b,c\ge 0,  a+b+c+a^2 +b^2 +c^2 =6. $ Prove that
$$ ab+bc+ca+ ab^2 + bc^2+ ca^2 \leq 6$$
0 replies
sqing
12 minutes ago
0 replies
subsets of {1,2,...,mn}
N.T.TUAN   11
N 13 minutes ago by MathLuis
Source: USA TST 2005, Problem 1
Let $n$ be an integer greater than $1$. For a positive integer $m$, let $S_{m}= \{ 1,2,\ldots, mn\}$. Suppose that there exists a $2n$-element set $T$ such that
(a) each element of $T$ is an $m$-element subset of $S_{m}$;
(b) each pair of elements of $T$ shares at most one common element;
and
(c) each element of $S_{m}$ is contained in exactly two elements of $T$.

Determine the maximum possible value of $m$ in terms of $n$.
11 replies
N.T.TUAN
May 14, 2007
MathLuis
13 minutes ago
Nice one
imnotgoodatmathsorry   4
N 35 minutes ago by lbh_qys
Source: Own
With $x,y,z >0$.Prove that: $\frac{xy}{4y+4z+x} + \frac{yz}{4z+4x+y} +\frac{zx}{4x+4y+z} \le \frac{x+y+z}{9}$
4 replies
1 viewing
imnotgoodatmathsorry
May 2, 2025
lbh_qys
35 minutes ago
No more topics!
IMO 90/3 and IMO 00/5 cross-up
v_Enhance   60
N May 4, 2025 by GingerMan
Source: USA TSTST 2018 Problem 8
For which positive integers $b > 2$ do there exist infinitely many positive integers $n$ such that $n^2$ divides $b^n+1$?

Evan Chen and Ankan Bhattacharya
60 replies
v_Enhance
Jun 26, 2018
GingerMan
May 4, 2025
IMO 90/3 and IMO 00/5 cross-up
G H J
G H BBookmark kLocked kLocked NReply
Source: USA TSTST 2018 Problem 8
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
OronSH
1745 posts
#49
Y by
The answer is all $b$ such that $b+1$ is not a power of $2.$

First, we may assume $n$ odd since otherwise it fails $\pmod 4.$ Additionally, let $o$ be the order of $b \pmod p.$ If we have $p \mid b^n+1,$ then we must have $o \mid 2n$ and $o \mid p-1.$ Now, if $b+1$ is a power of $2,$ we let $p$ be the smallest prime factor of $n$ and we see that $o<p$ but $o \mid 2n$ so we must have $o=2,$ which gives $b+1 \equiv 0 \pmod p,$ impossible. Thus there are no solutions (except for trivial $1$) in this case.

Now if $b+1$ is not a power of $2$ there is some prime $p$ dividing it. Furthermore, from Lifting the Exponent, we see that $p^2 \mid b^p+1,$ since $\nu_p(b^p+1)=\nu_p(b+1)+1.$ Next, since $b \ne 2,$ by Zsigmondy's there is some prime $q$ dividing $b^p+1$ but not $b^i+1$ for $1 \le i <p.$ Notice that $\nu_q(b^{pq}+1)=\nu_q(b^p+1)+1,$ so $p^2q^2 \mid b^{pq}+1.$ Then there is again some prime $r$ dividing $b^{pq}+1$ but not $b^i+1$ for $1 \le i < pq,$ and we get that $pqr=n$ works, and we may repeat this, so there are infinitely many solutions in this case and 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.
dolphinday
1327 posts
#50
Y by
All work except for $b = 2^x - 1$.
We will use induction to prove that all numbers $\neq 2^x - 1$ work.
$\newline$
Base Case:
We take a prime $p \neq 2$ that divides $b + 1$.
Then by LTE, we have $v_p(b^p + 1^p) = v_p(p) + v_p(b + 1) \geq 2$, so $p^2$ divides $b^p + 1^p$.

$\newline$
Inductive Step:
Then by Zsigmondy, there is a prime $q$ dividing $b^{pq} + 1^{pq}$ that does not divide $b^p + 1$. Using LTE again, we find that $p^2q^2$ also divides $b^{pq}$. We can repeat this, so there are infinitely many $n$ that work, so our induction is done


Note that this does not work for $b = 2^x - 1$ as $b + 1$ is a power of two(so we can't apply LTE the same way we did.)
$\newline$

Now to prove the other direction.
Suppose $q$ is the smallest prime dividing $n$. Then we have $b^{2n} \equiv 1\pmod{p}$, so the order of $b\pmod{p}$ divides $\gcd(2n, p-1) = 2$, therefore $p$ divides $b^2 - 1$, so $b \equiv 1\pmod{p}$(not $-1$). This then means that $b^n + 1 \equiv 2\pmod{p}$, which is a contradiction because $p \neq 2$ due to $p$ dividing $2^x - 1$, so we are done.
This post has been edited 1 time. Last edited by dolphinday, Dec 25, 2023, 5:21 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Shreyasharma
682 posts
#51
Y by
We claim that $\boxed{\text{all } b \text{ not of the form } 2^k -1 \text{ are good.}}$

We first try to determine $b$ for which there may exist infinitely such good $n$. Say we have a satisfactory base case of $n$ for some $b$. Then we wish to find some prime $p \nmid n$ such that $p^2 \mid b^{np} + 1$.

Claim: We can find a satisfactory infinite sequence of $n$ for $b \neq 2$ and $b \neq 2^k - 1$ for some $k$, using Zsigmondy.

Proof. Consider taking $p \neq 2$ as a primitive divisor of $b^{2n} - 1$. Then note that $p \nmid n$ follows as $n \mid b^{\phi(n)} - 1$ and $p \nmid b^{\phi(n)}-1$. Also clearly $p \mid b^n + 1$ as $p \nmid b^n - 1$. Then we find,
\begin{align*}
b^{np} \equiv b^n \equiv - 1\pmod{p}
\end{align*}Note that LTE gives $\nu_p(b^{np} + 1) = \nu_p(b^n+1) + \nu_p(p) \geq 2$. Hence $p^2 \mid b^{np}+1$.

Now note this argument fails for $n$ in which we are unable to find a base case, or where our base case violates Zsigmondy's. Namely when we have,
  • The only solution for some $b$ such that $b + 1$ is a power of $2$ is $n = 2$.
  • The only solution when $b = 2$ is $n = 3$
Thus the claim holds. $\blacksquare$

Now we in fact show that for $b = 2$ or $ b =2^k - 1$ there exists no satisfactory $n$.

Claim: For $ b =2^k - 1$ or $b = 2$ there exists no satisfactory $n$ for a base case.

Proof. We will handle the first bullet to begin with. Assume that $b = 2^k - 1$ for some $k$. Then we wish to find $n \neq 2$ such that $n^2 \mid (2^k - 1)^n + 1$. Taking the smallest prime $p$ dividing $n$, which we will assume is greater than $2$. Then we must have,
\begin{align*}
(2^k - 1)^n &\equiv - 1 \pmod{p}\\
(2^k - 1)^{2n} &\equiv 1 \pmod{p}
\end{align*}Then $\text{ord}_p(2^k - 1) \mid \gcd(2n, p - 1) = 2$ from which we conclude either $\text{ord}_p(2^k - 1) = 1$ of $\text{ord}_p(2^k - 1) = 2$. Testing the first case we find we then have,
\begin{align*}
2^k - 1 &\equiv 1 \pmod{p}\\
\iff 2^k &\equiv 2 \pmod{p}\\
\iff 2^{k-1} &\equiv 0 \pmod{p} \iff p = 2
\end{align*}Testing the second case we have,
\begin{align*}
2^{2k} - 2^{k + 1} &\equiv 0 \pmod{p}\\
2^{2k} &\equiv 2^{k+1} \pmod{p}\\
2^{k - 1} &\equiv 0 \pmod{p} \iff p = 2
\end{align*}Thus we must have $2 \mid n$. However then note that then $4 \mid (2^k - 1)^{n} + 1$, but we have $(2^k - 1)^n + 1 \equiv 2 \pmod{4}$, a contradiction. Thus indeed whenever $b + 1$ is a power of $2$ there are no satisfactory values of $n$.

To handle the second bullet, note that it is just 90IMO3, and we see that $n = 3$ is indeed the only solution, so $b = 2$ fails. Hence our claim holds. $\blacksquare$

We will now present a base-case construction for all other $b$.

For some $b$ consider taking $n$ as the smallest odd prime divisor $p$ of $b + 1$. Then LTE we find,
\begin{align*}
\nu_p(b^p + 1) = \nu_p(b + 1) + \nu_p(p) \geq 2
\end{align*}Thus we're done.

Remark: I felt like this problem was just stress testing Zsigmondy, after using the 00IMO5 argument. Also big thank you to nebula on the OTIS discord server for hinting me along on this problem.
This post has been edited 1 time. Last edited by Shreyasharma, Dec 28, 2023, 5:19 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
#52
Y by
:coolspeak:
$\boxed{\textcolor{blue}{\text{I claim all}\hspace{0.2cm} b\hspace{0.2cm} \text{satisfies, except when}\hspace{0.2cm} b+1 \hspace{0.2cm}\text{is a power of } \hspace{0.1cm}2}}$

$\textcolor{red}{\text{Case 1.} \hspace{0.2cm} b+1 \hspace{0.2cm} \text{is a power of} \hspace{0.2cm}2}$

If $n$ is even, as $b$ is odd then $b^n+1\equiv 1+1\equiv 2\not\equiv 0\pmod 4$ so n odd; let $p\neq 2$ be the smallest prime dividing then $b^{2n}\equiv 1\pmod p$ and $b^{p-1}\equiv 1\pmod p$ thus $\operatorname{Ord}_p(b)\mid 2\gcd\left(n,\frac{p-1}{2}\right)=2$, so $p\mid b^2-1=(b-1)(b+1)$, but $b+1$ is a power of $2$ thus $p\mid b-1$ thus $b^n+1\equiv  1^n+1\equiv 2\pmod p$ a contradiction.

$\textcolor{red}{\text{Case 2.} \hspace{0.2cm} b+1 \hspace{0.2cm} \text{is not a power of} \hspace{0.2cm}2}$
Let $p$ prime such that $p\mid b+1$, then by Lifting the Exponent
$$\nu_p(b^p+1)=\nu_p(b+1)+\nu_p(p)\geq 2$$so $p^2\mid b^p+1$, take $q\mid b^p+1$ a primitive prime divisor of $b^p+1$ which by Zsigmondy exists, then $q\mid b^p+1\mid b^{pq}+1$ and again by LTE
$$\nu_q\left((b^p)^q+1\right)=\nu_q(b^p+1)+\nu_q\geq 2$$so in fact $p^2q^2\mid b^{pq}+1$, therefore we can continue this sequence adding primes in a way that every new prime is a primitive prime that divides $b^{p_1p_2\cdots p_k}+1$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
joshualiu315
2534 posts
#53
Y by
The answer is $\boxed{n \neq 2^k-1, \ k \in \mathbb{N}_{>1}}$.

For numbers not of the form $2^k-1$, we will build up values of $n$ inductively. For the base case, consider a prime $p$ that divides $b+1$. LTE gives

\[\nu_p(b^p+1) = \nu_p(b+1)+\nu_p(p) \ge 2.\]\[\implies p^2 \mid b^p+1.\]
For the inductive step, consider a prime $q$ that divides $b^p+1$, which exists by Zsigmondy. We have

\[\nu_q(2^{pq}+1) = \nu_q(2^p+1)+1 \ge 2,\]
so $(pq)^2 \mid 2^{pq}+1$, completing the induction.

This only applies when the desired primes are not equal to $2$, or when the prime factorization of $b+1$ does not only consist of $2$'s. Hence, numbers that are one less than powers of $2$ are not covered in this induction.

For the sake of contradiction, assume $b+1$ is a perfect power of $2$. Let $r$ be the smallest prime dividing $b+1$; due to a modulo $4$ argument, $r \neq 2$. We have

\[b^{2n} \equiv 1 \pmod{p},\]
so $\operatorname{ord}_p(b) \mid \gcd(2n, p-1) = 2$. Thus, $p \mid b^2-1 = (b-1)(b+1)$. Since $b+1$ contains only factors of $2$, which cannot be $p$, we have $p \mid b-1$. However,

\[b \equiv 1 \pmod{p} \implies b^n \equiv -1 \equiv 1 \pmod{p} \implies p=2,\]
a contradiction.

Therefore, we are left with our desired solution set.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shendrew7
796 posts
#54
Y by
Our answer is all $\boxed{b \neq 2^k-1}$. Notice that our condition implies
\[\operatorname{ord}_p b \mid 2n, \operatorname{ord}_p b \nmid n \implies v_2(\operatorname{ord}_p) > v_2(n).\]
First note that $n$ must be odd. Suppose $p_1$ is the least prime divisor of $n$, where we assume there exists a solution other than $n=1$. Then
\[\operatorname{ord}_{p_1} b \mid \gcd(2n,p_1-1) = 2 \implies p \mid b^2-1, p \nmid b-1.\]
Zsigmondy tells us this primitive root must exist iff $b+1$ is not a power of two. If it is, we're stuck; otherwise, we just procede inductively with Zsigmondy to find infinitely many solutions. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
peppapig_
280 posts
#55
Y by
I claim that the answer is all $b>2$ such that $b\neq 2^k-1$.

C1: First, I claim that $n$ is odd. This is obvious if $b$ is even. However, if $b$ is odd, we have that
\[b^n+1\equiv 2\mod 4 \iff \nu_2(b^n+1)=1,\]since both $b$ and $1$ are odd. However, this is a contradiction, since $\nu_2(n^2)\geq2$ if $n$ is even. Therefore, $n$ must be odd.

C2: I claim that $b=2$ and $b=2^k-1$ do not have infinite solutions. First, note that $b=2$ does not have infinite solutions. This is seen in IMO's 1990/3, where we proved that the only solutions were $n=1$ and $n=3$. Now, I claim that if $b=2^k-1$, then the only solution is $n=1$. This is because if we let $p$ be the smallest prime to divide $n$, we have that
\[p\mid b^n+1 \iff 2\mid ord_p(b), ord_p(b)\mid 2n.\]but by Euler's Totient, we also have that $ord_p(b)\mid p-1$, so this implies that $ord_p(b)\mid \gcd(2n,p-1)$. However, since $p$ is the smallest prime that divides $n$, this means that $\gcd(2n,p-1)=2$. Therefore, since $ord_p(b)$ is even, we have that $ord_p(b)=2$. This gives that
\[p\mid b^2-1=(b-1)(b+1).\]However, since $ord_p(b)=2>1$, this implies that $p$ does not divide $b-1$. Therefore, we have that
\[p\mid b+1=2^k,\]meaning that $p=2$ if $n>1$, which is impossible, since by (C1) we proved that $n$ must be odd. Therefore, if $b=2^k-1$, $n=1$ is the only solution, which is clearly not infinite.

C3: I claim that for all other $b$, we have infinitely many solutions. We do this by using an induction similar to that of IMO's 2000/5! Call a number $n$ "appley" if $n^2\mid b^n+1$. I now claim that if for a prime $p$ such that $p\mid b^n+1$ and $\gcd(p,n)=1$, if $n$ is "appley", then so is $np$. Note that by LTE, we have that
\[\nu_p(b^{np}+1)=\nu_p(b^n+1)+1\geq 2,\]meaning that $p^2\mid b^{np}+1$. Additionally, since $p$ is odd, we have that
\[b^n+1\mid b^{np}+1,\]meaning that $n^2\mid b^{np}+1$ since $n$ is "appley". Therefore we must have that $n^2p^2\mid b^{np}+1$, meaning that $np$ is also "appley", as desired. Finally, for the last step of the induction, we use the starting $n=1$ as our base case. Note that by Zsigmondy's, we have that there will always exist such a prime $p$ from here on out such that $p\mid b^n+1$ but not $n$. Therefore for all $b$ not equal to $2^k-1$ or $2$, $n^2\mid b^n+1$ has infinitely many solutions, finishing the problem.
This post has been edited 1 time. Last edited by peppapig_, Mar 14, 2024, 6:09 PM
Reason: Typo fix, b^n+1, not \nu_2(b^n+1)
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
asdf334
7585 posts
#56
Y by
bashing practice...

For any prime $p\mid n$ notice that
\[p\mid b^{2n}-1\implies \text{ord}_p(b)\mid 2n\implies \text{ord}_p(b)\mid \gcd(2n,p-1).\]The smallest prime $p$ dividing $n$ would then satisfy $\gcd(n,p-1)=1$. In particular, we should have $\text{ord}_p(b)\in \{1,2\}$.

So $p\mid b-1$ or $p\mid b^2-1$ and $p\nmid b-1$.

Note that $p\mid b^n+1$ though, hence we would require $p=2$ in the former case. In particular we need $4\mid b^n+1$ where $n$ is even, which is impossible.

Hence $p\mid b^2-1$ and $p\nmid b-1$. Also note that $n$ is odd, and $p\neq 2$. This additionally implies $b-1$ and $b+1$ are relatively prime.

In particular $p\mid b+1$. Hence if $b+1$ is a power of two we fail.

Admittedly I've been spoiled to the answer, but the point is that if $b+1$ is not a power of two we are fine. Start with said value of odd $p$ as a "base case" and we'll inductively create values $n_1,n_2,\dots$ which all satisfy $n_i^2\mid b^{n_i}+1$.

Oops the next step took too long. Write $n_1=pq$. By LTE we have $p^2\mid b^{pq}+1$. So we need $q^2\mid b^{pq}+1$. In particular it will suffice to have $b^p+1\equiv 0\pmod q$. Hence we just need to show there exists a prime $q$ dividing $b^p+1$ which doesn't divide $b+1$ (and is therefore not equal to $p$). This is guaranteed by Zsigmondy (since we can easily find $b\ge 4$ and bypass special cases).

Repeat the process. If $n_2=pqr$ we need $r^2\mid b^{pqr}+1$. It suffices to have $r\mid b^{pq}+1$ while $r\nmid b^p+1$, which is fine.

We can get infinitely many values this way. Done. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
straight
415 posts
#57
Y by
Truly one of the NT problems of all time
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
BestAOPS
707 posts
#58
Y by
Lemma: If $a \mid b$ and $a$ and $b$ are odd, then $x^a + 1 \mid x^b + 1$ for all natural numbers $x$.

Proof: We know $\frac{b}{a}$ is odd, so
\[ \frac{x^b + 1}{x^a + 1} = x^{b-a} - x^{b-2a} + x^{b-3a} - \ldots + 1. \]
We claim that all $b$ such that $b+1$ is not a power of $2$ work.
We will generate an infinite sequence of $n$'s satisfying the condition, starting with $n_1 = p_1$ where $p_1$ is an odd prime that divides $b+1$.
The sequence will also satisfy the additional condition that $n_i$ can be written in the form $p_1p_2\ldots p_i$ where the $p_j$'s are distinct odd primes.
To establish the base case, notice that since $p_1$ is odd, we can use lifting the exponent:
\[ \nu_{p_1}(b^{p_1} + 1) = \nu_{p_1}(b + 1) + 1 \geq 2. \]Thus, $n_1^2 \mid b^{n_1} + 1$.

Next, assume $n_i = p_1p_2\ldots p_i$ satisfies the condition that $n_i^2 \mid b^{n_i} + 1$.
Then, let $p_{i+1}$ be a primitive prime divisor of $b^n + 1$.
Its existence is guaranteed by Zsigmondy's theorem.
We claim that $p_{i+1} \neq 2$.
If $b$ is even, then that is obvious.
Otherwise, $2 \mid b+1$, so $2$ would not be a primitive divisor.
Thus, $p_{i+1}$ is an odd prime distinct from any of $p_1,p_2,\ldots,p_i$.

We then claim that if $n_{i+1} = p_1p_2\ldots p_{i+1}$, then $n_{i+1}$ satisfies the condition from the problem statement.
By our lemma, we know that $n_i^2 = (p_1p_2\ldots p_i)^2 \mid b^{n_i} + 1 \mid b^{n_{i+1}} + 1$.
It remains to check $p_{i+1}^2 \mid b^{n_{i+1}} + 1$.
Again, we use lifting the exponent:
\[ \nu_{p_{i+1}}(b^{n_{i+1}} + 1) = \nu_{p_{i+1}}(b^{n_i} + 1) + \nu_{p_{i+1}}(p_{i+1}) = \nu_{p_{i+1}}(b^{n_i} + 1) + 1 \geq 2. \]
Thus, by induction, every $n$ in this infinite sequence works.

Finally, we prove that if $b+1$ is a power of $2$, there are finitely many solutions to $n^2 \mid b^n + 1$.
Suppose $n > 1$ satisfies $n^2 \mid b^n + 1$.
If $n$ were even, then $b^n + 1$ would be either $1$ or $2$ mod $4$, but it also must be $0$ mod $4$ in order to be divisible by $n^2$.
Hence, $n$ must be odd.

Next, let $p$ be the least prime factor of $n$.
We have
\[ b^n \equiv -1 \implies b^{2n} \equiv 1 \pmod{p}, \]so the order of $b^2$ must divide $\gcd(p-1,n)$.
Since $p$ is the least prime factor of $n$, this GCD must equal $1$; otherwise, $\gcd(p-1,n)$ would have a prime factor less than $p$ which is also a factor of $n$, contradicting $p$'s minimality.
Thus, $b^2 \equiv 1 \pmod{p}$, or in other words, $p \mid (b-1)(b+1)$.
We know $p$ cannot divide $b+1$ since $b+1$ is a power of $2$.

Thus, $p$ must divide $b-1$, and $b \equiv 1 \pmod{p}$.
However, this means $b^n \equiv 1 \pmod{p}$, so $p$ must be $2$, which is impossible since $n$ is odd!
This concludes the proof.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
smileapple
1010 posts
#59
Y by
Fix the value of $b$. We say that $n$ is good if $n^2\mid b^n+1$ and there exists some odd prime $q$ such that $q\nmid n^2$ and $q\mid b^n+1$.

We claim that if $n$ is good, then so is $np$ for some odd prime $p$ with $p\nmid n$. Indeed, for such $n$, take $p$ satisfying $p\nmid n^2$ and $p\mid b^n+1$. Then $\nu_p(b^{np}+1)=\nu_p((b^n)^p-(-1)^p)=\nu_p(b^n+1)+\nu_p(p)\ge2$ from exponent lifting. Additionally, we have $n^2\mid b^{np}+1$ as $p$ is odd. This implies that $n^2p^2\mid b^{np}+1$.

Additionally, since $b>2$, by Zsigmondy there exists some odd prime $q$ for which $q\nmid b^n+1$ and $q\mid b^{np}+1$. In particular, $q\nmid n^2p^2$ but $q\mid b^{np}+1$. This proves our claim. In particular, it follows that if there exists some integer that is good, then there exists infinitely many integers that are good.

Let $k=\frac{b+1}{2^{\nu_2(b+1)}}$. We claim the if $k>1$, so that $b+1$ is not a power of two, then $k$ is good. If $p\mid k$, by exponent lifting we have $\nu_p(b^k+1)=\nu_p(b^k-(-1)^k)=\nu_p(b+1)+\nu_p(k)=2\nu_p(k)$, so $k^2\mid b^k+1$. Additionally, by Zsigmondy there exists some prime $q$ for which $q\nmid b+1$ and $q\mid b^k+1$. Since $k\mid b+1$, we have $q\nmid k^2$. Thus $k$ is good.

As a result, if $b+1$ is not a power of $2$, our above results imply that there exist infinitely many good integers and thus infinitely many positive integers $n$ such that $n^2\mid b^n+1$.

Finally, if $b+1=2^m$ for some $m$, we claim that $n^2\nmid b^n+1$ for all $n$. Indeed, if otherwise, let $p$ be the minimal odd divisor of $n$. Then $b^n\equiv-1\pmod p$ and $b^{p-1}\equiv1\pmod p$, so that $b^2\equiv b^{\gcd(2n,p-1)}\equiv1\pmod p$ by minimality. Thus $p\mid b^2-1=(b-1)(b+1)$, and since $p$ is odd we have $p\mid b-1$. But then $b^n\equiv1\pmod p$, a contradiction.

Our solution set for $b$ is therefore $\boxed{\{b\mid b\in\mathbb{N},b>2,\log_2(b+1)\notin\mathbb{Z}\}}$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cursed_tangent1434
634 posts
#60
Y by
We claim that the answer is all positive integers $b>2$ excluding those of the form $2^r-1$ for some positive integer $r>1$. We shall first show that such $b$ indeed do not work.

First note that if $n$ is even $2 \mid b^n+1$ which requires $b$ to be odd. However then,
\[b^n+1 \equiv 1+1 \equiv 2 \pmod{4}\]since $n$ is even which contradicts the fact that $4 \mid n^2 \mid b^n+1$. Thus, for all $b$ there exists no even $n$ such that $n^2 \mid b^n+1$.

With this observation in hand, it is clear that $b^n+1$ must have some odd prime factors. We look at the smallest prime factor $q \mid n$. Note that $b^{2n}\equiv1 \pmod{q}$ but $b^n \equiv -1 \pmod{q}$. This means that $\text{ord}_q(2) \mid 2n$. Thus, if $\text{ord}_q(2)$ has some odd prime factor, it is a violation of the minimality of $q$ implying that $\text{ord}_q(2)$ is a perfect power of two. However, $\nu_2(2n)=1$ since $n$ must be odd so $\text{ord}_q(2) \mid 2$. However, this cannot be $1$ as $b^n\equiv -1 \not \equiv 1 \pmod{q}$. This means that $\text{ord}_q(2)=2$ and thus, $b+1 \equiv 0 \pmod{q}$.

However, if $b=2^r-1$ for some positive integer $r$ this implies that there exists some odd prime $q$ such that $q \mid 2^r$ which is a clear contradiction. Thus, all $b$ of the prescribed form in deed do not satisfy the desired conditions.

To see why all other $b$ work, we employ induction. Consider an odd prime $p_1 \mid b+1$. Note that,
\[\nu_{p_1}(b^{p_1}+1) = \nu_{p_1}(b+1)+\nu_{p_1}(p_1) \ge 2\]and thus, $p_1^2 \mid b^{p_1}+1$. Now, assume that for some $r \ge 1$ there exists a product of distinct odd primes $x_{r-1}=p_1p_2\dots p_{r-1}$ and $x_r=p_1p_2\dots p_r$ such that $x_{r-1}^2 \mid b^{x_{r-1}}+1$ and $p_{r} \mid b^{x_{r-1}}+1$ ($p_r\not \in \{p_1,p_2,\dots , p_{r-1}\}$). Note that,
\[(p_1p_2\dots p_{r-1})^2 \mid 2^{x_{r-1}}+1 \mid 2^{x_r}+1\]Also, by Lifting the Exponent Lemma,
\[\nu_{p_r}(2^{x_r}+1)= \nu_{p_r}(2^{x_{r-1}}+1)+\nu_{p_r}(p_r) \ge 2\]Thus, $p_r^2 \mid 2^{x_r}+1$ and we conclude that $x_r^2 \mid 2^{x_r}+1$. Further, by Zsigmondy's Theorem there exists some odd prime factor $p_{r+1}$ such that $p_{r+1} \mid 2^{x_r}+1$ but $p_{r+1} \nmid 2^{x_{r-1}}+1$ (and hence $p_{r+1} \not \in \{p_1,p_2,\dots , p_r\}$). We then let $x_{r+1}=p_1p_2\dots p_rp_{r+1}$ which completes the induction and solves the problem.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Adywastaken
46 posts
#61
Y by
Claim: $\exists$ infinitely many $n$ iff $b+1\neq 2^k$

Proof: FTSOC assume otherwise.
Let $p_1$ be a prime such that $p_1\mid b+1$
$v_{p_1}(b^{p_1}+1)=1+v_{p_1}(b+1)$
$\implies (p_1)^2\mid b^{p_1}+1$
By Zsig, $\exists p_2\neq p_1$ such that $p_2\mid b^{p-1}+1$
Now, let's say $(p_1p_2\dots p_{n-1})^2p_n\mid b^{p_1p_2\dots p_{n-1}}+1$
By LTE again, $(p_1p_2\dots p_n)^2\mid b^{p_1p_2\dots p_n}+1$
By Zsig, $\exists p_{n+1}$ such that $p_{n+1}\mid b^{p_1p_2\dots p_n}+1$
So, $(p_1p_2\dots p_n)^2p_{n+1}\mid b^{p_1p_2\dots p_n}+1$
Hence, there are infinitely many solutions.

Now, let $b=2^k-1$
Let $p$ be the smallest prime dividing $n$.
$p\mid b^n+1$, $p\mid 2^{p-1}+1$, so $p\mid (b+1)(b-1)$.
$\implies p\mid b+1$, $p=2$
For $n\geq 2$, $4\mid b^n+1\equiv 2\pmod 4$, since $n$ is even and $b$ is odd. $\Rightarrow\!\Leftarrow$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ilikeminecraft
650 posts
#62
Y by
I claim the answer is all integers that can't be expressed as $2^n - 1.$

I will start by proving that any integer of that form can't work.

I claim that $n$ must be odd. Take modulo 4, and thus $b^n + 1 \equiv 2 \pmod 4 \implies \nu_2(b^n + 1) = 1 < 2,$ which is a contradiction. For $n \neq 1,$ let $p$ be the smallest prime dividing $n.$ I claim that $p \mid b + 1.$

By using the fact that $b^{2n} \equiv 1\pmod {p},$ and $b^{p - 1} \equiv 1 \pmod p,$ we have that $\operatorname{ord}_(b) \mid (2n, p - 1) = 2.$ Thus, $p\mid b^2 - 1.$ However, if $p\mid b - 1,$ we have that $b^n + 1 \equiv 1 + 1 \equiv 2 \pmod p\implies p\mid 2,$ which is clearly a contradiction. Thus, $p\mid b + 1.$

If $b + 1 = 2^k$ for some $k,$ then we clearly have no solution because then $p = 2,$ which is a contradiction.

Now, I prove that any other integer can work. I will do this with induction. Let $p_i, n_i$ be an infinite sequence. Let $n_k = \prod\limits_{i = 0}^k p_i$. Let $p_i = 1,$ and then for all $i\geq 1,$ let $p_i$ be distinct primes such that $p_{i} \mid b^{n_{i - 1}} + 1.$ We know $p_i$ exists because of Zsigmondy's, and that $p_i$ are all odd. I claim that each term in the sequence $n_k$ is a valid construction. We will prove this with induction.

$k = 0$ is obviously true. $k = 1$ has that $n_1 = p_1 \mid b + 1.$ Thus, $\nu_{p_1} (b^{p_1} + 1) = \nu_{p_1}(b + 1) + 1 \geq 2.$ Thus, this is valid.

Now assume that $k = l$ has that is a valid construction. Hence, $n_l^2 \mid b^{n_l} + 1 \mid b^{n_lp_{l + 1}} + 1 = b^{n_{l + 1}} + 1.$ We also have that $p_{l + 1} \mid b^{n_{l}} + 1,$ and hence $\nu_{p_{l + 1}} (b^{n_{l + 1}} + 1) = \nu_{p_{l + 1}}({b^{n_{l}}}^{p_{l + 1}} + 1)\geq2.$ Thus, 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.
GingerMan
5 posts
#63
Y by
Answer is all integers $b>2$ except for those that are $1$ less than a power of $2$.
First, we show $b=2^k-1$ fails. Let $p$ be the minimal prime divisor of $n$; the order of $b$ mod $p$ divides $\gcd(2n, p-1) = 2$ and thus $p \mid b+1 \implies p=2$. Now $4 \mid b^n+1$ and since $b \equiv -1 \pmod 4$, we have $n$ odd which is a contradiction.
We now prove all other $b$ work. Let $p_1$ be an odd prime divisor of $b+1$. Define $p_{k+1}$ as an odd prime satisfying $p_{k+1} \mid b^{p_k}+1$ and $p_{k+1} \notin \{p_1,\dots,p_k\}$ (this exists by Zsigmondy). Fix any positive integer $m$ and define $n=p_1p_2\dotsb p_m$.
By LTE,
\begin{align*}
  \nu_{p_k}(b^n+1) &= \nu_{p_k}(b^{p_{k-1}}+1) + \nu_{p_k}(n/p_{k-1})\\
  &= \underbrace{\nu_{p_k}(b^{p_{k-1}}+1)}_{\ge 1} +
  \underbrace{\nu_{p_k}(n)}_{=1} \geq 2\nu_{p_k}(n)
\end{align*}for $k=2,\dots,m$; we similarly show
\[ \nu_{p_1}(b^n+1) = \nu_{p_1}(b+1) + \nu_{p_1}(n) \geq 2\nu_{p_1}(n). \]Hence $n^2 \mid b^n+1$, and by setting $m=1,2,\dots$, we get infinitely many integers.
The case $b=2$ fails by IMO 1990/3.
Z K Y
N Quick Reply
G
H
=
a