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
ISL 2015 C4 But I misread statement (ii)
ItzsleepyXD   1
N 2 minutes ago by golue3120
Source: ISL 2015 C4 misread
Let $n$ be a positive integer. Two players $A$ and $B$ play a game in which they take turns choosing positive integers $k \le n$. The rules of the game are:

(i) A player cannot choose a number that has been chosen by either player on any previous turn.
(ii) A player cannot choose a number consecutive to any number chosen by any player on any turn.
(iii) The game is a draw if all numbers have been chosen; otherwise the player who cannot choose a number anymore loses the game.

The player $A$ takes the first turn. Determine the outcome of the game, assuming that both players use optimal strategies.

note
1 reply
+1 w
ItzsleepyXD
15 minutes ago
golue3120
2 minutes ago
Geometry tangent circles
Stefan4024   65
N 8 minutes ago by eg4334
Source: EGMO 2016 Day 2 Problem 4
Two circles $\omega_1$ and $\omega_2$, of equal radius intersect at different points $X_1$ and $X_2$. Consider a circle $\omega$ externally tangent to $\omega_1$ at $T_1$ and internally tangent to $\omega_2$ at point $T_2$. Prove that lines $X_1T_1$ and $X_2T_2$ intersect at a point lying on $\omega$.
65 replies
Stefan4024
Apr 13, 2016
eg4334
8 minutes ago
Maximum Sum in a Grid
Mathdreams   1
N 12 minutes ago by iliya8788
Source: 2025 Nepal Mock TST Day 3 Problem 1
Let $m$ and $n$ be positive integers. In an $m \times n$ grid, two cells are considered neighboring if they share a common edge. Kritesh performs the following actions:

1. He begins by writing $0$ in any cell of the grid.
2. He then fills each remaining cell with a non-negative integer such that the absolute difference between the numbers in any two neighboring cells is exactly $1$.

Kritesh aims to fill the grid in a way that maximizes the sum of the numbers written in all the cells. Determine the maximum possible sum that Kritesh can achieve in terms of $m$ and $n$.

(Kritesh Dhakal, Nepal)
1 reply
+2 w
Mathdreams
4 hours ago
iliya8788
12 minutes ago
Something nice
KhuongTrang   25
N an hour ago by KhuongTrang
Source: own
Problem. Given $a,b,c$ be non-negative real numbers such that $ab+bc+ca=1.$ Prove that

$$\sqrt{a+1}+\sqrt{b+1}+\sqrt{c+1}\le 1+2\sqrt{a+b+c+abc}.$$
25 replies
KhuongTrang
Nov 1, 2023
KhuongTrang
an hour 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.
shendrew7
793 posts
#102
Y by
ddot1 wrote:
I think that's missing a little detail: How do you know that $3$ divides $n$ only once? Otherwise, you could have something like $$\gcd(2n,p_2-1)=18.$$

Follows from the LTE statement - $0 < v_3(n) \leq 1$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ddot1
24391 posts
#103
Y by
Oh, duh - sorry, I didn't read it carefully enough.
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
#104
Y by
The answer is $n=1,3$. We show that there are no other solutions. Since $n$ must be odd, assume $n \geq 5$.
Let $p$ be the least prime factor of $n$. We have $p > 2$ since $n$ is odd. Furthermore, $2^n + 1 \equiv 0 \implies 4^n \equiv 1 \pmod{p}$.

We claim the order of $4$ mod $p$ is $1$. This is because the order must divide $\gcd{n, p-1}$, which must equal $1$ otherwise $\gcd{n, p-1}$ must have smaller prime factors which also divide $n$, contradicting $p$'s minimality. Thus, $4 \equiv 1 \pmod{p}$, so $p = 3$.

In order for $n^2$ to divide $2^n + 1$, we must have $\nu_3(n^2) = 2\nu_3(n) \leq \nu_3(2^n + 1)$. Since $3 \mid 2 + 1$, using the lifting the exponent lemma yields $\nu_3(2^n + 1) = 1 + \nu_3(n)$. We then conclude that $\nu_3(n) \leq 1$, but since $3$ is the smallest prime factor of $n$, we must have $\nu_3(n) = 1$.

Now, we write $n = 3k$ for some $k$ not divisible by $2$ or $3$. Since $n \geq 5$, we have $k > 1$ and we can let $p$ be the smallest prime factor of $k$. But similarly to before, we see that $2^{6k} \equiv 1 \pmod{p}$ and thus $64 \equiv 1 \pmod{p}$. This means $p \mid 63$. Since $p \geq 5$, we must have $p = 7$.

This tells us that $n^2$ is divisible by $7$. However, $2^n + 1 \equiv 8^k + 1 \equiv 2 \pmod{7}$, so 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.
ATGY
2502 posts
#105
Y by
Say $p$ is the smallest prime dividing $n$, so we have $2^n + 1 \equiv 0 \mod{p} \implies 2^{2n} \equiv 1\mod{p}$. Clearly $p \neq 2$. Let $k$ denote the order of $2 \mod{p}$. Observe that $k \mid 2n$, and since $2^{p - 1} \equiv 1 \mod{p}$, we have $k \mid (2n, p - 1) \implies k = 1, 2$. $k = 1$ is impossible, which means $k = 2 \implies 2^2 \equiv 1 \mod{p} \implies p = 3$.

If $q$ is the next smallest prime dividing $2^n + 1$, we have $\text{ord}_q(2) \mid (2n, q - 1) = 3, 6$. $q = 7$ fails upon checking.

So $p = 3$ is the only prime dividing $n$. We need $v_3(2^n + 1) \geq v_3(n^2) = 2v_3(n)$, for $n^2 \mid 2^n + 1$. By LTE, $v_3(2^n + 1) = v_3(3) + v_3(n) \implies 1 + v_3(n) \geq 2v_3(n) \implies v_3(n) \leq 1$.

$v_3(n) = 0 \implies n = 1$, which clearly works. $v_3(n) = 1 \implies n = 3$, which works as well. So, we are done.
This post has been edited 3 times. Last edited by ATGY, Jul 13, 2024, 11:03 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
SomeonesPenguin
124 posts
#106
Y by
The problem is equivalent to $2^n\equiv -1\pmod{n^2}$. This implies that $2^{2n}\equiv 1\pmod{n^2}$. Also note that $n=1$ is a solution so suppose $n\neq 1$. Now take the smallest prime factor of $n$ (notice that this can’t be $2$). We have that $ord_p(2)\mid 2n$ and also note that $ord_p(2) \le p-1$ so this order must be equal to $2$. Hence $p$=3.

Now let $n=3^ab$ where $a\ge 1$ and $b$ is an odd integer. We have: $$\nu_3(n^2)\le \nu_3(2^n+1)$$But we clearly have $\nu_3(n^2)=2a$ and from LTE $\nu_3(2^n+1)=a+1$ hence $a$ must be qual to $1$ so we get that $n=3b$.

Plugging this back in, we get that $9k^2\mid 2^{3k}+1$. Now $k=1$ is a solution ($n=3$) so suppose that $k\neq 1$. Let $q$ be the smallest prime factor of $k$ and note that this isn’t $2$ or $3$. We similarly get that $2^{6k}\equiv 1\pmod q$ so $ord_q(2)\mid 6k$ so from minimality this implies $ord_q(2)\mid 6$. Hence $ord_q(2)\in \{3,6\}$. In either case, we get that $q=7$ so $7\mid 2^n+1$ which isn’t possible. Therefore the only solutions are $n=1$ and $n=2$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Eka01
204 posts
#109
Y by
Obviously $n$ is odd.
Consider the smallest prime $p$ dividing $n$ then order of $p$ modulo $2$ divides $2n$ but not $n$ and it also divides $p-1$ implying the order must be $3$ giving that the smallest prime must be the smallest prime.
However $LTE$ gives us that $\nu_3(2^n +1)$ =$\nu_3(n) +1$ which is greater than $2\nu_3(n)$ implying $n=3k$ where $k$ is an odd number not divisible by $3$. Plugging this and using similar order arguments, we get that $7$ divides $2^n +1$ which is false implying $k=1$.

Hence $\boxed{n=3}$ is the only solution.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pie854
243 posts
#110
Y by
The answer is $n=1,3$ which clearly works.

Suppose $n>1$ and let $p_0$ be the smallest prime divisor of $n=p_0^{e_0} p_1^{e_1} \cdots p_k^{e_k}$ with $e_i\geq 0$ for $i>0$. Let $a=\text{ord}_{p_0^2}(2)$. Since $p_0^2\mid 2^n+1$, it follows that $a\nmid n$ and $a\mid 2n$. So $a=2p_0^{f_0}p_1^{f_1} \cdots p_k^{f_k}$ where $f_i\leq e_i$ for all $0\leq i\leq k$. But $a\mid p_0(p_0-1)$ and thus $a\leq p_0(p_0-1)$. From this it follows that $a\in \{2, 2p_0, 2p_i\}$ for some $1\leq i\leq k$. If $a=2$ then $p_0^2\mid 2^2-1=3$ which is absurd. If $a=2p_i$ then from $2p_i\mid p_0(p_0-1)$ it follows that $p_i\mid p_0-1$ which is absurd as well.

Thus $a=2p_0$ and $2^{2p_0}\equiv 1\pmod{p_0^2}$. From here it's easy to get that $p_0=3$. So $n=3m$ (by LTE $2v_3(n)\leq v_3(2^n+1)=v_3(2+1)+v_3(n)$ and thus $v_3(n)\leq 1$ and so $3\nmid m$) and $m^2\mid 8^m+1$. We have $m=p_1^{e_1} p_2^{e_2}\cdots p_k^{e_k}$ and let's assume $m>1$ and that $p_1$ is the smallest prime divisor. Let $b=\text{ord}_{p_1^2}(8)$ and as before we get $b\in \{2,2p_1\}$ ($b$ cannot be $2p_i$ because of the same reason as before). If $b=2$ then $p_1^2\mid 8^2-1=3^2\cdot 7$ but this is impossible. So $b=2p_1$ and $p_1^2\mid 8^{2p_1}-1$. From this we get $p_1\mid 8^2-1=3^2\cdot 7$ and so $p_1=7$. Note that $7^2\mid 42799\cdot 7^2=8^7-1$, so $b\leq 7$ but this is a contradiction since $b=2\cdot 7=14$. From this contradiction it follows that $m=1$ and we get the 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.
EVKV
43 posts
#111
Y by
For min prime p|n
p≠3
2^2n = 1 mod p
Ord2 mod p | 2n

ord 2 mod p = 2,,2n,n,d,2d
Here d|n d>1
So it can only be 2,2d

As ord2 mod p ≤ p-1
d≥p
2d≥ 2p> p-1
Thus ord 2 mod p ≠ 2d for any d>1
Thus ord 2 mod p = 2

4= 1 mod p
So p = 3

Thus 3| n

Let q be second smallest prime
Ord 2 mod q = 2,2d,6,2n,n,3d
Where d|n
If d>3
3d>q-1
So d≤3
Now 3 cases
d= 3 X
d=2 X
d= 1 works
So ord 2 mod q = 3

Same reasoning with 2d gives
ord 2 mod q = 6

Implies q=7

Which is not possible

Hence no such q exists
Thus only 3|n
So
2vp(n) ≤ vp(3) + vp(n)
n = 3
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AshAuktober
972 posts
#112
Y by
We claim the only solution is $n = 3$, which clearly works.

Note that $2^{2n} \equiv 1 \pmod{p}$, where $p$ is the smallest prime factor of $n$. But $2^{p-1} \equiv 1 \pmod p$, and thus $2^2 = 2^{\gcd(2n, p-1)} \equiv 1 \pmod{p} \implies \boxed{p = 3}.$

Now note that we have from LTE and $\nu_p$ stuff that

$$2\nu_p(n) \le \nu_p(2^n + 1) = \nu_p(3) + \nu_p(n) = 1 + \nu_p(n) \implies \nu_p(n) = 3.$$Now let $n = 2m$ where $\gcd(m, 3) = 1$.
Then we have $m^2 \mid 8^m + 1 \implies 8^{2m} \equiv 1 \pmod{q}$ where $q$ is the smallest prime divisor of $m$.
But $8^{q-1} \equiv 1 \pmod{q} \implies 8^2 \equiv 1 \pmod{q} \implies q \in \{3, 7\}$.
$q = 3$ is impossible because then $\nu_p(n) \ge 2$, and $q = 7$ is impossible because $8^m + 1 \equiv 2 \pmod{7}$, and so $7$ can never divide the numerator. Thus in fact no such prime exists, and $m = 1 \implies \boxed{n = 3}$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ItsBesi
139 posts
#116
Y by
Solution:

$\frac{2^n+1}{n^2}$ is an integer $\implies n^2 \mid 2^n+1$

Let $p$ be the smallest prime divisor of $n$ (such a prime exists because $n > 1$).

Note that $p \neq 2$ because RHS$=2^n+1 \equiv 1 \pmod 2$

So $p \mid n^2 \mid 2^n+1 \implies p  \mid 2^n+1 \iff 2^n+1 \equiv 0 \pmod p \implies 2^n \equiv -1 \pmod p \implies$ $$\boxed{2^{2n} \equiv 1 \pmod p}$$
Also by Fermat's Little Theorem we have that : $$\boxed{2^{p-1} \equiv 1 \pmod p} (\because p \neq 2 \implies gcd(2,p)=1)$$
Hence $$2^{\gcd(2n,p-1)} \equiv 1 \pmod p$$
Note that since $p$ is the smallest prime divisor of $n$ we get that $\gcd(n,p-1)=1$ so $\gcd(2n,p-1)=1 \vee 2$

Note that since $2n \equiv 0 \pmod 2$ and $p-1 \equiv 0 \pmod 2$ we get:

$\gcd(2n,p-1)=2 \implies 2^2 \equiv 1 \pmod p \implies p \mid 3 \implies p=3 (\because p$-prime)

Hence $3=p \mid n \implies n=3k \implies 9k^2 \mid 8^k+1$

Now suppose that $k >1$ so simmilarly as before let $q$ be the smallest prime divisor of $k$ hence we find that $$8^{\gcd(2k,q-1)} \equiv 1 \pmod q $$
$\gcd(2k,q-1)=2 \implies 8^2 \equiv 1 \pmod q \implies q \mid 63=7 \cdot 3^2 \implies q=3 \vee q=7$ however if $q=7$ then:
$7=q \mid 9k^2 \mid 8^k+1 \implies 7 \mid 8^k+1$ but RHS$=8^k+1 \equiv 1+1=2 \pmod 7$ so $7 \nmid RHS \rightarrow \leftarrow$

So $3=q \mid k \implies k=3 \ell \implies$ $$81 \ell^2 \mid 8^{3 \ell}+1$$
Now by taking $\nu_3$ we get:

$4+2 \cdot \nu_3(\ell)=\nu_3(81 \ell^2) \leq \nu_3(8^{3 \ell}+1) \stackrel{LTE}{=} \nu_3(8+1)+\nu_3(3 \cdot \ell)=3+\nu_3(\ell) \implies 4+2 \cdot \nu_3(\ell) \leq 3+\nu_3(\ell) \implies$ $$\nu_3(\ell) \leq -1 \rightarrow \leftarrow$$
Hence there doesn't exist a prime $q$ such that $q \mid k$ hence $k=1 \implies n=3$ which obviously works $\blacksquare$
This post has been edited 2 times. Last edited by ItsBesi, Jan 22, 2025, 2:21 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathfortaleza23
1 post
#117
Y by
what is r ?
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
#118
Y by
Observe that $n$ must be odd, and suppose that $n>1$. Letting $p$ be the minimal prime divisor of $n$, we have $2^n\equiv-1\pmod p$ and thus $4^n\equiv1\pmod p$. We also have $4^{p-1}\equiv1\pmod p$. By minimality $\gcd(n,p-1)=1$, so it follows that $p=3$.

Let $k=\nu_3(n)$ and $m=\frac{n}{3^k}$. Then $\nu_3(2^n+1)=\nu_3(2^{3^km}-(-1)^{3^km})=v_3(3^km)+v_3(3)=k+1$ from exponent lifting, giving $2k=\nu_3(n^2)\le\nu_3(2^n+1)=k+1$. Thus $k=1$.

Hence, write $n=3m$ for $3\nmid m$, so that $n^2\mid 2^n+1$ occurs if and only if $m^2\mid 8^m+1$. Let $q$ be the smallest prime factor of $m$. Then similarly $64\equiv64^{\gcd(m,q-1)}\equiv1\pmod q$. Hence $q\in\{3,7\}$, but $q\neq 3$ as $3\nmid m$. and $q\neq 7$ as $8^m\equiv-1\pmod q$. Thus $q$ cannot exist; in other words, we have $m=1$.

Our solution set for $n$ is thus $\boxed{\{1,3\}}$. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
John_Mgr
62 posts
#119
Y by
smileapple wrote:
Observe that $n$ must be odd, and suppose that $n>1$. Letting $p$ be the minimal prime divisor of $n$, we have $2^n\equiv-1\pmod p$ and thus $4^n\equiv1\pmod p$. We also have $4^{p-1}\equiv1\pmod p$. By minimality $\gcd(n,p-1)=1$, so it follows that $p=3$.

Let $k=\nu_3(n)$ and $m=\frac{n}{3^k}$. Then $\nu_3(2^n+1)=\nu_3(2^{3^km}-(-1)^{3^km})=v_3(3^km)+v_3(3)=k+1$ from exponent lifting, giving $2k=\nu_3(n^2)\le\nu_3(2^n+1)=k+1$. Thus $k=1$.

Hence, write $n=3m$ for $3\nmid m$, so that $n^2\mid 2^n+1$ occurs if and only if $m^2\mid 8^m+1$. Let $q$ be the smallest prime factor of $m$. Then similarly $64\equiv64^{\gcd(m,q-1)}\equiv1\pmod q$. Hence $q\in\{3,7\}$, but $q\neq 3$ as $3\nmid m$. and $q\neq 7$ as $8^m\equiv-1\pmod q$. Thus $q$ cannot exist; in other words, we have $m=1$.

Our solution set for $n$ is thus $\boxed{\{1,3\}}$. $\blacksquare$

$n>1$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
John_Mgr
62 posts
#120
Y by
I too posted it.
Attachments:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cursed_tangent1434
576 posts
#121
Y by
We claim that the only positive integers $n$ which satisfy the given condition are $n=1$ and $n=3$. It is clear that these solutions work, so we shall now show that they are the only ones.

Since $n=1$ clearly works, we consider $n>1$ in what follows. Further, the left hand side is clearly odd for all $n \ge 1$ so we must have $n$ being odd. We first show the following.

Claim : For any positive integer $n$ which satisfies the given divisibility, $3$ must be the smallest prime divisor of $n$.

Proof : Let $q$ denote the smallest prime divisor of $n$. Since $q \mid n^2 \mid 2^n+1$ it follows that $2^{2n} \equiv 1 \pmod{q}$. Thus, $\text{ord}_q(2) \mid 2n$. Also, $\text{ord}_q(2) \mid q-1$ so if there exists an odd prime $r \mid \text{ord}_q(2)$ we have $r \mid 2n$ so $r \mid n$. But, $r \mid q-1$ so $r \le q-1 <q$ which contradicts the minimality of $q$. Thus, $\text{ord}_q(2)$ is a perfect power of two. Now, since $\nu_2(2n)=1$ as $n$ is odd we must have $\text{ord}_q(2) =2$. Thus,
\[0 \equiv 2^n+1 \equiv 2 +1 \equiv 3 \pmod{q}\]which holds if and only if $q=3$ as desired.

Now note,
\[2\nu_3(n)=\nu_3(n^2) \le \nu_3(2^n+1) = \nu_3(2+1)+\nu_3(n)=\nu_3(n)+1\]which implies that $\nu_3(n)=1$. Thus, if $n$ is a power of $3$ it must be $3$ itself, which works. Next, we consider $n>3$ and hence, there exists a second smallest prime divisor $s>3$ of $n$. As before note that if $\text{ord}_s(2)$ is not a power of two, $n$ must have a smaller prime divisor than $s$. Thus, $\text{ord}_s(2)$ can only have factors of $2$ and $3$ in it's prime factorization. However, as noted before, $\nu_2(2n) =1$ and $\nu_3(2n)=1$ so the only possibilities are $\text{ord}_s(2)=2$ and $\text{ord}_s(2)=6$. The former implies that $s=3$ which is a contradiction while the second implies $2^6 \equiv 1 \pmod{s}$ which requires $s \mid 63$. Thus we must have $s=7$. But it is not hard to check that $2^n+1 \not \equiv 0 \pmod{7}$ over all positive integers $n$ so this is a contradiction and we are done.
Z K Y
N Quick Reply
G
H
=
a