Join our free webinar April 22 to learn about competitive programming!

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
GCD of a sequence
oVlad   7
N 16 minutes ago by grupyorum
Source: Romania EGMO TST 2017 Day 1 P2
Determine all pairs $(a,b)$ of positive integers with the following property: all of the terms of the sequence $(a^n+b^n+1)_{n\geqslant 1}$ have a greatest common divisor $d>1.$
7 replies
oVlad
Today at 1:35 PM
grupyorum
16 minutes ago
Another System
worthawholebean   3
N 22 minutes ago by P162008
Source: HMMT 2008 Guts Problem 33
Let $ a$, $ b$, $ c$ be nonzero real numbers such that $ a+b+c=0$ and $ a^3+b^3+c^3=a^5+b^5+c^5$. Find the value of
$ a^2+b^2+c^2$.
3 replies
worthawholebean
May 13, 2008
P162008
22 minutes ago
basically INAMO 2010/6
iStud   2
N 23 minutes ago by MrHeccMcHecc
Source: Monthly Contest KTOM April P1 Essay
Call $n$ kawaii if it satisfies $d(n)+\varphi(n)+1=n$ ($d(n)$ is the number of positive factors of $n$, while $\varphi(n)$ is the number of integers not more than $n$ that are relatively prime with $n$). Find all $n$ that is kawaii.
2 replies
iStud
2 hours ago
MrHeccMcHecc
23 minutes ago
Inequality with three conditions
oVlad   2
N 31 minutes ago by Quantum-Phantom
Source: Romania EGMO TST 2019 Day 1 P3
Let $a,b,c$ be non-negative real numbers such that \[b+c\leqslant a+1,\quad c+a\leqslant b+1,\quad a+b\leqslant c+1.\]Prove that $a^2+b^2+c^2\leqslant 2abc+1.$
2 replies
oVlad
Today at 1:48 PM
Quantum-Phantom
31 minutes ago
No more topics!
(2^n + 1)/n^2 is an integer (IMO 1990 Problem 3)
orl   105
N Apr 6, 2025 by cursed_tangent1434
Source: IMO 1990, Day 1, Problem 3, IMO ShortList 1990, Problem 23 (ROM 5)
Determine all integers $ n > 1$ such that
\[ \frac {2^n + 1}{n^2}
\]is an integer.
105 replies
orl
Nov 11, 2005
cursed_tangent1434
Apr 6, 2025
(2^n + 1)/n^2 is an integer (IMO 1990 Problem 3)
G H J
Source: IMO 1990, Day 1, Problem 3, IMO ShortList 1990, Problem 23 (ROM 5)
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
orl
3647 posts
#1 • 11 Y
Y by Davi-8191, Amir Hossein, itslumi, centslordm, Adventure10, megarnie, HWenslawski, arinmath, RhinocerosHornbill, Mathlover_1, Mango247
Determine all integers $ n > 1$ such that
\[ \frac {2^n + 1}{n^2}
\]is an integer.
This post has been edited 2 times. Last edited by Amir Hossein, Mar 21, 2016, 12:01 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
orl
3647 posts
#2 • 12 Y
Y by Amir Hossein, veehz, myh2910, centslordm, megarnie, Adventure10, HWenslawski, arinmath, Mango247, and 3 other users
Approach by maxal:

Let $ N = \{ n\in\mathbb{N} : 2^n\equiv - 1\pmod{n^2} \}$ be the set of all solutions and $ P = \{ p\text{ is prime} : \exists n\in N, p|n \}$ be the set of all prime factors of the solutions.

It is clear that the smallest element of $ P$ is 3.
Assume that $ P\ne\{3\}$ and let's try to determine the second smallest element $ q = \min (P\setminus\{3\})$.

Let $ n\in N$ be a multiple of $ q$. It is important to notice that $ 9\not|n$ (otherwise it is easy to get that any power of $ 3$ divides $ n$, a non-sense). Therefore, $ n = 3^t n'$ where $ t = 0$ or $ 1$ and $ n'$ does not have prime divisors smaller than $ q$.
Since $ 2^{2n}\equiv 1\pmod{q}$, the multiplicative order $ r = ord_q(2)$ of 2 modulo $ q$ divides $ 2n$. Moreover, $ r$ must be even, since otherwise we would have $ 2^n \equiv 1\pmod{q}$, a contradiction to the required $ 2^n \equiv - 1\pmod{q}$.
Since $ r < q$ we must have $ r = 2$ or $ 2\cdot 3 = 6$. But the numbers $ 2^2 - 1 = 3$ and $ 2^6 - 1 = 63$ deliver only one new prime factor $ 7$, implying that $ q = 7$. However, in this case $ r = ord_7(2) = 3$, a contradiction. This contradiction proves that $ P = \{3\}$ and thus $ N = \{1,3\}$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ramakrishna
6 posts
#3 • 4 Y
Y by centslordm, megarnie, Adventure10, ehuseyinyigit
Let us assume n > 1. Obviously n is odd. Let p ≥ 3 be the smallest
prime divisor of n. In this case (p − 1, n) = 1. Since 2n + 1 | 22n − 1, we
have that p | 22n − 1. Thus it follows from Fermat’s little theorem and
elementary number theory that p | (22n − 1, 2p−1 − 1) = 2(2n,p−1) − 1.
Since (2n, p − 1) ≤ 2, it follows that p | 3 and hence p = 3.
Let us assume now that n is of the form n = 3kd, where 2, 3 d. We first
prove that k = 1.
Lemma. If 2m − 1 is divisible by 3r, then m is divisible by 3r−1.
Proof. This is the lemma from (SL97-14) with p = 3, a = 22, k = m,
α = 1, and β = r.
Since 32k divides n2 | 22n − 1, we can apply the lemma to m = 2n and
r = 2k to conclude that 32k−1 | n = 3kd. Hence k = 1.
Finally, let us assume d > 1 and let q be the smallest prime factor of d.
Obviously q is odd, q ≥ 5, and (n, q−1) ∈ {1, 3}. We then have q | 22n−1
and q | 2q−1 − 1. Consequently, q | 2(2n,q−1) − 1 = 22(n,q−1) − 1, which
divides 26 −1 = 63 = 32 · 7, so we must have q = 7. However, in that case
we obtain 7 | n | 2n + 1, which is a contradiction, since powers of two can
only be congruent to 1,2 and 4 modulo 7. It thus follows that d = 1 and
n = 3. Hence n > 1 ⇒ n = 3.
It is easily verified that n = 1 and n = 3 are indeed solutions. Hence these
are the only solutions.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Akashnil
736 posts
#4 • 2 Y
Y by centslordm, Adventure10
ramakrishna wrote:
$ \cdots$ Since 2n + 1 | 22n − 1, $ \cdots$
I don't understand this :maybe:
perhaps you could use latex?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
chengyuLi
33 posts
#5 • 2 Y
Y by centslordm, Adventure10
thanks for such a nice solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
FelixD
588 posts
#6 • 7 Y
Y by Kunihiko_Chikaya, veehz, tck_darkness, centslordm, MELSSATIMOV40, Adventure10, Mango247
That's the official solution (see the attachment). ramakrishna copied it and so the LaTeX formulas got lost.
Attachments:
IMO1990.3.pdf (79kb)
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
grupyorum
1413 posts
#7 • 3 Y
Y by centslordm, Adventure10, ehuseyinyigit
Another approach:

Let $ p$ be the smallest prime divisor of $ n$. It is easy to check that, $ n=3$ is obviously solution. Let $ p^{a} || n$ . $ p | 2^{2n}-1$ and $ p | 2^{p-1} - 1$ (By the fermat's theorem), we obtain that $ p=3$. It is also obvious that n is an odd number.
Lemma: For all $ n$ positive integers, $ 2$ is a primitive root modulo $ 3^{n}$.
$ 3^{2a} | 2^{2n} - 1$. Using the lemma, we get that $ \phi(3^{2a}) | 2n$. Using the power of three, we obtain that $ 3^{2a-1} | 3^{a}$. This is only possible when $ a \geq 2a-1$. So $ a=1$. Now $ q$ be the second smallest prime divisor of $ n$. $ (2n,q-1) = 2 , 6$. If this equals to 2, we get $ q=3$ which is a contradiction.If $ (2n,q-1) = 6$ then $ q|63$. We know that $ q$ is different from $ 3$. Hence $ q$ must be $ 7$. But this is impossible since
$ 2^{n} +1\equiv 2\mod 7$ when $ n$ is divisible by $ 3$. Hence the answer is $ n = 3$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
enndb0x
843 posts
#8 • 3 Y
Y by centslordm, Adventure10, Mango247
FelixD, where did you find the official solution ?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
neergard
47 posts
#9 • 3 Y
Y by centslordm, Adventure10, Mango247
The "official" solution is that in the shortlist, http://www.artofproblemsolving.com/Forum/download/file.php?id=1042, pp. 45-46, which is somewhat different from those posted here.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Victory.US
230 posts
#10 • 4 Y
Y by centslordm, PianoPlayer111, Adventure10, Mango247
orl wrote:
Determine all integers $ n > 1$ such that
\[ \frac {2^n + 1}{n^2}
\]
is an integer.

Click to reveal hidden text

because $n^2|2^n+1$ so $n$ is odd. then $n=\prod {{p_i}^{{\alpha _i}}} $ with $p_i $ odd

$n^2|2^n+1$ lead to $v_p(n^2)<v_p(2^n+1)$

but,use the lifting exponent we have $v_p(2^n+1)=v_p(2^n-(-1)^n)=v_p(3)+v_p(n)$

if $p_i \ge 5$ then $v_p(3)=0$.

so that we have $v_p(n^2) \le v_p(n)$ wich $n=1$

if p=3 we have $v_3(n^2) \le 1+ v_3 (n) $ then $v_3(n)=0;1$ then $n=1,3$

summary,we have n=1,n=3 :!:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
nnosipov
245 posts
#11 • 4 Y
Y by JRM1999, centslordm, Adventure10, Mango247
Generalisation: if $p$ is an odd prime, $n>1$ and $(p-1)^n+1$ is divisible by $n^{p-1}$, then $p=n=3$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathmdmb
1547 posts
#12 • 3 Y
Y by centslordm, Adventure10, Mango247
nnosipov,you missed the case $n=p=2$

It was a problem from Imo with the additional condition $n<2p$.But we can even eliminate the case $n<2p$ and much more generally prove the fact.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Vikernes
77 posts
#13 • 3 Y
Y by centslordm, Adventure10, Mango247
Some approaches of the following generalisation?
Let $a,b>1$ positive integers such that $\dfrac{a^b+1}{b^a}$ is an integer. Find all $a,b$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Amir Hossein
5452 posts
#14 • 8 Y
Y by Dumboi01, chirita.andrei, Imayormaynotknowcalculus, centslordm, Adventure10, Mango247, ehuseyinyigit, NicoN9
Victory.US wrote:
...but,use the lifting exponent we have $v_p(2^n+1)=v_p(2^n-(-1)^n)=v_p(3)+v_p(n)$...

No, this is not true. If you want to use LTE you should make sure that $p|2+1=3,$ but this is not true for any prime $p,$ and so you can't use LTE here.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathmdmb
1547 posts
#15 • 10 Y
Y by Navi_Makerloff, Congruentisogonal44, Pal702004, centslordm, ZHEKSHEN, JG666, Adventure10, Mango247, ehuseyinyigit, endless_abyss
Well let me post my solution
Lemma:
If $n|2^n+1,n=3^k$
Proof:
Obviously $n$ odd,let $p$ be the smallest prime factor of $n,$then
$2^{2n}\equiv 1\mod p,2^{p-1}\equiv 1\mod p\implies 2^{gcd(2n,p-1)}\equiv 1\mod p$
Since $p$ is the smallest prime factor,no prime of $p-1$ will be shared with $n,$so $gcd(2n,p-1)=2$
Therefore $2^2\equiv 1\mod p\implies p=3$ and so let $n=3^kl$ where $3\not| l,$but if $l>1$ similarly the smallest prime factor of $l$ is $3,$contradiction.
Thus $n=3^k$
Now get back to original problem and we shall use Lte,so
$v_3(n^2)=2k$ and
$v_3(2^n+1)=k+1$
If $n>1,k\ge 1$ and we get $2k\le k+1\implies k\le 1$ implying $k=1$
Then the only solutions $n=\boxed {1,3}$
Z K Y
G
H
=
a