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
Additive combinatorics (re Cauchy-Davenport)
mavropnevma   3
N 5 minutes ago by Orzify
Source: Romania TST 3 2010, Problem 4
Let $X$ and $Y$ be two finite subsets of the half-open interval $[0, 1)$ such that $0 \in X \cap Y$ and $x + y = 1$ for no $x \in X$ and no $y \in Y$. Prove that the set $\{x + y - \lfloor x + y \rfloor : x \in X \textrm{ and } y \in Y\}$ has at least $|X| + |Y| - 1$ elements.

***
3 replies
mavropnevma
Aug 25, 2012
Orzify
5 minutes ago
Ducks can play games now apparently
MortemEtInteritum   34
N 34 minutes ago by HamstPan38825
Source: USA TST(ST) 2020 #1
Let $a$, $b$, $c$ be fixed positive integers. There are $a+b+c$ ducks sitting in a
circle, one behind the other. Each duck picks either rock, paper, or scissors, with $a$ ducks
picking rock, $b$ ducks picking paper, and $c$ ducks picking scissors.
A move consists of an operation of one of the following three forms:

[list]
[*] If a duck picking rock sits behind a duck picking scissors, they switch places.
[*] If a duck picking paper sits behind a duck picking rock, they switch places.
[*] If a duck picking scissors sits behind a duck picking paper, they switch places.
[/list]
Determine, in terms of $a$, $b$, and $c$, the maximum number of moves which could take
place, over all possible initial configurations.
34 replies
+1 w
MortemEtInteritum
Nov 16, 2020
HamstPan38825
34 minutes ago
Floor sequence
va2010   87
N 41 minutes ago by Mathgloggers
Source: 2015 ISL N1
Determine all positive integers $M$ such that the sequence $a_0, a_1, a_2, \cdots$ defined by \[ a_0 = M + \frac{1}{2}   \qquad  \textrm{and} \qquad    a_{k+1} = a_k\lfloor a_k \rfloor   \quad \textrm{for} \, k = 0, 1, 2, \cdots \]contains at least one integer term.
87 replies
va2010
Jul 7, 2016
Mathgloggers
41 minutes ago
INMO 2019 P3
div5252   45
N 43 minutes ago by anudeep
Let $m,n$ be distinct positive integers. Prove that
$$gcd(m,n) + gcd(m+1,n+1) + gcd(m+2,n+2) \le 2|m-n| + 1. $$Further, determine when equality holds.
45 replies
div5252
Jan 20, 2019
anudeep
43 minutes ago
No more topics!
2^n-1 has n divisors
megarnie   47
N Apr 26, 2025 by Ilikeminecraft
Source: 2021 USEMO Day 1 Problem 2
Find all integers $n\ge1$ such that $2^n-1$ has exactly $n$ positive integer divisors.

Proposed by Ankan Bhattacharya
47 replies
megarnie
Oct 30, 2021
Ilikeminecraft
Apr 26, 2025
2^n-1 has n divisors
G H J
Source: 2021 USEMO Day 1 Problem 2
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pi_is_3.14
1437 posts
#40
Y by
Odd n immediately fail (except 1) by mod 4.

Claim: Only $2^n + 1$ square exists when $n = 3$.

Proof: $2^n + 1 = (2a + 1)^2 = 4a^2 + 4a + 1 \implies 2^n = 4(a)(a + 1)$ but this will have odd factors unless $a = 1$ and $n = 3$.

For even n, let $n = 2^k \cdot m$ for odd m. Factor $2^{n}- 1= (2^m - 1)(2^m + 1)(2^{2m} + 1)\dots (2^{\frac{n}{2}} + 1)$. Then, by Euclidean Algorithm, we have that $\gcd(2^m + 1, 2^{2m}+ 1) = \gcd(2^m + 1, 2^m - 1) = 1$. Therefore, all of the above terms are relatively prime and since divisor function is multiplicative so to find divisors, just multiply # of divisors of each term. Note that for $m$ not equal to 1 or 3, every term can not be a square and # divisors of that term must have factor of 2. However, there are much such terms than factors of 2 in n so fail.

Case 1: $m = 3$
$n = 3 \dots 2^k$. 6 works, all higher k fail since $2^6 + 1$ does not have 2 factors.

Case 2: $m = 1$
Will work for all $k$ until $2^{2^{k - 1}} + 1$ isn't prime which first happens at k = 6.

So answer is 1, 2, 4, 6, 8, 16, 32 which all work
This post has been edited 2 times. Last edited by pi_is_3.14, Mar 5, 2023, 11:10 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Leo.Euler
577 posts
#45
Y by
The answer is $n=1, 2, 4, 6, 8, 16, 32$. Suppose $n$ has $m$ distinct prime divisors $p_1, \ldots, p_m$. Then, define the sequence $a_i=2^{p_i^{\nu_{p_i}(n)}}-1$ for $i=1, 2, \ldots, m$. The central claim is the following.

Claim: We have
1. For each $1 \le i \le n$, $a_i$ has exactly $\nu_{p_i}(n)$ distinct prime divisors.
2. The set of distinct prime divisors of $2^n-1$ is the set of distinct prime divisors of $\prod_{i=1}^m a_i$.

Proof:
We first show that $a_i$ has at least $\nu_{p_i}(n)$ distinct prime divisors. Write \[ a_i = \bigg(\frac{2^{p_i^1}-1}{2^{p_i^0}-1}\bigg)\cdots\bigg(\frac{2^{p_i^{\nu_{p_i}(n)}-1}}{2^{p_i^{\nu_{p_i}(n)-1}}-1}\bigg). \]Label these quotients $q_1, \ldots, q_{\nu_{p_i}(n)}$; by Zsigmondy's theorem, $q_k$ has a prime divisor that does not divide $q_{k-1}$ for all $2 \le k \le \nu_{p_i}(n)$. This implies that $a_i$ has at least $\nu_{p_i}(n)$ distinct prime divisors.

Next, we show that $\prod_{i=1}^m a_i$ divides $2^n-1$. To do so, notice that each of the $a_i$ divide $2^n-1$ and that $a_i$ and $a_j$ are relatively prime for distinct $i$ and $j$.

Finally we use the above two facts to write \[ \sum_{\text{prime} \ p} \nu_p(d(2^n-1)) \ge \sum_{\text{prime} \ p} \nu_p(d(\prod_{i=1}^m a_i)) = \sum_{\text{prime} \ p} \sum_{i} \nu_p(d(a_i)) = \sum_{i} \sum_{\text{prime} \ p} \nu_p(d(a_i)) \ge \sum_{i} \nu_{p_i}(n) = \sum_{\text{prime} \ p} \nu_p(n). \]
However, since $d(2^n-1)=n$, $\sum_{\text{prime} \ p} \nu_p(d(2^n-1)) = \sum_{\text{prime} \ p} \nu_p(n)$, so the inequalities in the above statement are tight. The claim follows. $\square$

By Zsigmondy's theorem and the Claim, $m=1$ or $n=6$.

Case 1: $m=1$
Then, $n=p^e$ for some prime $p$. However, $p=2$ by modulo 4 reasons. It can be checked that $0 \le e \le 5$ all work. Denote $F_n$ by the $n$th Fermat number. Notice that $2^{2^{k+1}}-1=(2^{2^k}-1)F_k$. Since $(F_k, 2^{2^k}-1)=1$, $d(2^{2^{k+1}}-1)=d(2^{2^k}-1)d(F_k)$. As such, $F_5$ is not prime, and from here it can be inductively shown that all $e \ge 6$ do not work. Thus, $n=1, 2, 4, 8, 16, 32$ are the solutions for this case.

Case 2: $n=6$
This can be verified to work, so $n=6$ works.

Hence, $n=1, 2, 4, 6, 8, 16, 32$ are the only solutions, which completes the proof. $\blacksquare$
This post has been edited 2 times. Last edited by Leo.Euler, Aug 20, 2023, 12:12 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HamstPan38825
8858 posts
#46
Y by
By looking at mod $4$, it's clear that $n$ must be even (or $n=1$). Now, let $n = 2^k \cdot a$, so $$2^n - 1 = (2^{2^{k-1} \cdot a} + 1)(2^{2^{k-2} \cdot a} + 1) \cdots (2^a + 1)(2^a - 1).$$
Claim. One of the terms on the RHS must be a perfect square.

Proof. Assume otherwise. Note that every pair of terms on the RHS are relatively prime. This implies that for each term there exists a $p$ that appears a net odd amount of times in the factorization of $2^n - 1$. But this implies $\nu_2(n) = \nu_2(\tau(n)) \geq k+1$, which is a contradiction. $\blacksquare$

By Mihailescu theorem no terms except for the last two can be perfect squares. On the other hand, $$2^a + 1 = r^2 \iff 2^a = (r+1)(r-1),$$which yields $a=3$ only. $2^a -1 = r^2$ fails by mod $4$ for $a \geq 3$, thus $a=1$ or $a=3$.

Now the condition can only really be true for finitely many $k$, as we need each of the terms on the RHS to be precisely prime. For $a = 3$, only $n=6$ works, and for $a=1$, $n = 2, 4, 8, 16, 32$ work as $2^{2^5} + 1$ is the first non-Fermat prime, done.
This post has been edited 1 time. Last edited by HamstPan38825, Apr 9, 2023, 7:00 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pi271828
3368 posts
#47
Y by
Let $n = 2^a \cdot b$. Now, $$2^n-1 = (2^b-1) \cdot \prod_{i=0}^{a-1} (2^{2^i \cdot b}+1)$$Notice that all these terms are relatively prime due to Euclidean Algorithm. We require $$\tau(2^b-1) \cdot \prod_{i = 0}^{a} \tau(2^{2^{i} \cdot b}+1) = n$$. Notice that there must be at least $2$ squares out of all the terms $2^b - 1, 2^b +1, 2^{2b}+1, \dots, 2^{(2^a \cdot b)} +1$. This is due to the fact that the LHS has $a+1$ terms, and the RHS has $v_2$ of $a$. This means there must be at least $1$ square among those terms. This implies that $b = 1, 3$. Casework finishes.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
huashiliao2020
1292 posts
#48
Y by
Very nice problem, writeup takes a while though. To no one in particular: Can you check this one carefully im not sure if fakesolve

It's obvious by mod 4 that n is even (except for the trivial n=1), so write $n=2^ab,2^n-1=(2^b-1)(2^b+1)(2^{2^1b}+1)...(2^{2^{b\frac n2}}+1)\quad(1)$; it's easily computed that these terms are pairwise relatively prime. This is important because if n has an odd factor >1, to have an odd factor in number of divisors, at least one from each of the terms in the factorization of (1) must have a perfect square in it's terms (since we have pairwise relativity); remarking that $(2c+1)^2=2^k+1\iff 2^k=4c(c+1)\implies c=1,k=3$, assuming b>1, we must have b=3.

Case 1: $2^b-1$ is a perfect square. Mod 4 it's immediate that b=1, so $$n=\tau(2^1+1)\tau(2^2+1)...\tau(2^{2^{a-1}}+1),$$where tau denotes the number of divisors function. Since the RHS has $a$ terms, all of them must be $2$, which implies that $2^{2^i}+1$ is prime, and since $2^{2^5}+1$ is composite, $k\le 5$; checking, all of them work. We conclude the numbers 1,2,4,16,32 work.

Case 2: $2^m+1$ is a perfect square. From earlier, we know b=3, so $$2^a 3=\tau(7)\tau(2^3+1)\tau(2^{2^13}+1)...\tau(2^{2^{a-1}3}+1)\iff2^a=\tau(7)\tau(2^{2^13}+1)...\tau(2^{2^{a-1}3}+1).$$Again, since there are a terms on the right, each of them must be 2 (meaning the terms inside the tau are prime), but $2^6+1$ is not prime, so $a\le 1$; checking, only $n=6$ works.

We conclude the final answer is $\boxed{\{1,2,4,6,8,16,32\}}$.$\blacksquare$
This post has been edited 1 time. Last edited by huashiliao2020, Sep 3, 2023, 11:59 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Math4Life7
1703 posts
#49
Y by
We can see that $n$ must be even. This is because $2^n -1$ is never a perfect square by $\pmod{4}$ unless $n = 1$ which is a solution.

Thus we let $n = 2^ab$ for $a \geq 1$. We can see that we can factor the given as $$(2^b - 1)(2^b+1)(2^{2b}+1) \ldots (2^{2^{a-1}b} +1)$$. We claim that all of these divisors are relatively prime.

First, we compare $(2^b-1)$ and $(2^{2^xb} + 1)$. We take a prime $p$ such that $p|2^b-1$ this means that $2^b = 1 \pmod{p}$ and consequently $2^{2^xb} \equiv 1 \pmod{p}$

Second, we compare $(2^{2^xb}+1)$ and $(2^{2^yb} +1)$ where $x <y$. We take a prime $p$ such that $p|2^{2^xb}+1$ this means that $2^{2^xb} \equiv -1 \pmod{p}$ and consequently $2^{2^yb} \equiv 1 \pmod{p}$

Now note $$\tau(2^n-1) = \tau(2^b-1) \cdot \tau(2^b+1) \cdot \tau(2^{2b}+1) \ldots \tau(2^{2^{a-1}b}+1)$$Since there are $a+1$ terms on the LHS one of them must be a perfect square. Since even powers never produce a perfect square we only consider $2^b-1$ and $2^b+1$.

If $2^b -1$ is a perfect square then we can take $\pmod{4}$ to see that $b = 1$ from this we get the solutions $1, 2, 4, 8, 16, 32$ (from fermat primes).

If $2^b+1$ is a perfect square then we can see that if $v_2(b) = x$ then $2^x + 1$ is a divisor of $2^b + 1$. This means that we need $(2^x + 1)^2 = 2^b+1$. This gives that $b = 3$ which indeed gives the solution $6$ (note we cannot multiply this by $2$ since $\tau(2^6+1) = 4$ which gives too much $v_2$).

Combining our answer is $\boxed{1, 2, 4, 6, 8, 16, 32}$. $\blacksquare$

This is incredibly similar to this.
This post has been edited 1 time. Last edited by Math4Life7, Sep 19, 2023, 2:39 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AtharvNaphade
341 posts
#50
Y by
Let $n = p_1^{e_1}p_2^{e_2}\dots p_k^{e_k}$. We have $\tau(2^{n} - 1) = p_1^{e_1}p_2^{e_2}\dots p_k^{e_k}$. By Zsigmondy's, there exists unique prime for each divisor $d | n$ except $d = 1, 6$. This means there are at least $(e_1 + 1)(e_2 + 1)\dots (e_k + 1)-2$ distinct primes dividing $2^n-1$, so there at least $2^{(e_1 + 1)(e_2 + 1)\dots (e_k + 1)-2}$ divisors of $\tau(2^n-1)$. However we know the number of divisors of $n$ is $(e_1 + 1)(e_2 + 1)\dots (e_k + 1)$, which implies $k \leq 2$.

For $k = 2$ we need the inequality to be an equality, meaning $6 | n$ and $e_i = 1$ giving only $n = 6$ which works.

For $k=1$ we have $\tau(2^{p^k} - 1) = p^k$. We can see $p = 2$ since otherwise all the prime factors of $2^{p^k} - 1$ have even powers, implying $2^{p^k} - 1$ is a perfect square, impossible mod 4. Then $$2^{p^k} - 1 = (2^{2^{k-1}}+1) (2^{2^{k-2}}+1)\dots (2+1).$$This gives exactly $k$ prime factors unless $n\geq 6$ by fermat primes, but we need $\leq k$ prime factors. Checking, our answers are then $\boxed{1, 2, 4, 6, 8, 16, 32}$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
OronSH
1730 posts
#51 • 3 Y
Y by ihatemath123, megarnie, mathmax12
Answer is $1,2,4,6,8,16,32.$

First if $n$ is odd we get $2^n-1$ is a square so $2^n=m^2+1$ but $m^2+1 \equiv 1,2 \pmod 4$ so $n=1$ which works.

Next if $\nu_2(n)=1$ we let $n=2k$ and we see $2^n-1=(2^k-1)(2^k+1)$ and when $k \ne 1,3$ we see that neither of these terms are squares (e.g. by Mihailescu) and these are relatively prime so $\nu_2(d(2^n-1)) \ge 2$ when $n \ne 2,6$ and checking $n=2,6$ both work.

Next we prove by induction that $\nu_2(n)<\nu_2(d(2^n-1))$ when $n=2^i k$ where $i$ is a positive integer and $k=32,6,$ or any odd positive integer greater than $3.$ The base cases are when $i=1,$ and we can check these easily (using the well-known factorization of $2^32+1$ for $k=32,$ and using our above work for $k$ odd.) Now suppose this is true for $n=2^i k.$ We will show it is also true for $n=2^{i+1}k.$ We have $\nu_2(2^{i+1}k)=1+\nu_2(2^i k),$ and $\nu_2(d(2^{2^{i+1}k}-1))=\nu_2(d(2^{2^i k}-1))+\nu_2(d(2^{2^i k}+1)).$ However, similarly as above we have $2^{2^i k}+1$ is not a square so $\nu_2(d(2^{2^i k}+1)) \ge 1$ and combining this with our inductive hypothesis we finish.

It remains to check the cases $n=4,8,16,32$ which are easy.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cursed_tangent1434
616 posts
#52 • 2 Y
Y by Shreyasharma, GeoKing
Solved with Shreyasharma. We claim that the answer is $1,2,4,6,8,16,32$ only. Throught the solution, let $d(n)$ denote the number of factors of $n$.

First, we have the following key claim.

Claim : $2^n-1$ and $2^n+1$ are not perfect squares for any $n\geq 4$.
Proof : We let $2^n-1=x^2$. Now, note that for all $n\geq 2$, $x^2+1 = 2^n \equiv 0 \pmod{4}$. Thus, $x^2\equiv 3 \pmod{4}$ which is a clear contradiction. Then, we let $2^n+1=x^2$. Now, $2^n=x^2-1=(x-1)(x+1)$. But, clearly almost one of these is divisible by 4. Thus, since we must have $x$ odd, one of $x-1$ or $x+1$ must be 2. Thus, $x=3$ or $x=1$. This implies that $n=3$, which is not in our range. Thus, the desired claim is in fact true.

Now, we have a look at the powers of two. Note that, $2^{32}+1$ is not prime (well yeah you are supposed to know this). Thus, $2^{64}-1$ has more than, $32\times 2 = 64$ factors. For all powers of two, $2^{2^m}$ for $m\geq 7$ we then have,
\[d(2^{2^m}-1)=d((2^{2^{m-1}}-1)(2^{2^{m-1}}+1)) = d(2^{2^{m-1}}-1)d(2^{2^{m-1}}+1)>2^{m-1} \times 2 = 2^m\]and thus, no solutions of this form exist for $m\geq 6$.

Now, that we have put that out of the way we look at numbers of the form $n=3\cdot 2^m$. Clearly, $3$ fails. Note that $2^12-1$ has $24$ factors. Thus, for all $m \geq 3$,
\[d(2^{3\cdot2^{m}})=d((2^{3\cdot2^{m-1}}-1)(2^{3\cdot 2^{m-1}}+1))=d(2^{3\cdot2^{m-1}})d(2^{3\cdot 2^{m-1}}) > 3\cdot 2^{m-1} \times 2 = 3\cdot 2^m\]Thus, no solutions of this form exist for $m\geq 2$.

Now, we look at $n=2^mk$ where $k\geq 5$. We use our original claim in our solution and further note the following claim.

Claim : For all $m_1<m_2$, $\gcd(2^{2^m_1}+1,\gcd(2^{2^m_2} +1)=1$ .
Proof : We simply look at
\[\gcd(2^{2^{m_1}}+1,\prod_{i=1}^{m_1-1}2^{2^{i}}+1)=\gcd(2^{2^{m_1}}-1,2^{2^{m_1}}+1)=1\]Thus, we can see that the claim is true.

Now, note that,
\begin{align*}
\nu_2(d(2^n-1))&=v_2(d(2^m-1)(2^m+1)\dots(2^{2^{k-1}m}+1))\\
&= v_2(d(2^m-1))+v_2(d(2^m+1))+\dots + v_2(d(2^{2^{k-1}m}+1))\\
& \geq k+1 \ \ \ \ \ \ \ \ \ \ \ \ \ \text{ by our first Claim none of these terms are odd}\\
&>k\\
&= v_2(2^km)\\
&= v_2(n)
\end{align*}Thus, $v_2(d(2^n-1))>v_2(n)$ for all $n=2^km$ ($k\geq 0$ and $k\geq 5$). Thus, it is impossible to have $d(2^n-1)=d(n)$ in these cases. We have explored all other cases separately before and they yielded no solutions besides the one's claim which can be confirmed quite easily using knowledge of Fermat Primes or simply using Wolfram Alpha.
This post has been edited 2 times. Last edited by cursed_tangent1434, Dec 29, 2023, 4:00 AM
Reason: latex
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
#54
Y by
Let $n=2^a b$, we have
$$2^n-1=(2^b-1)(2^b+1)\left(2^{2^1 b}+1\right)\cdots \left(2^{2^{a-1}b}+1\right)$$$\textcolor{blue}{\text{All terms in the product are relative primes}}$
First we prove the first term is relative prime with any other
\begin{align*}
\gcd(2^b-1,2^{2^i\cdot b}+1) &= \gcd( 2^b-1, 2^{2^i\cdot b}+1-(2^{2^i\cdot b}-1))  \\
&= \gcd(2^b-1,2)=1
\end{align*}And if $i<j$
$$\gcd(2^{2^i\cdot b}+1,2^{2^j\cdot b}+1)=d$$then $d\mid 2^{2^i\cdot b}+1$ so $2^{2^j\cdot b}\equiv 1\pmod d$ then $d=1$

$\textcolor{blue}{\text{Any terms in the product is a square for}\hspace{0.2cm} b>3}$
Note $2^{\text{even}}+1\equiv 3\pmod 3$ so only $2^b-1$ or $2^b+1$ can be a square, and by Catalan $b=1$ or $b=3$

Then, we have
$$d(2^n-1)=d(2^b-1)\cdot d(2^b+1)\cdot d\left(2^{2^1 b}+1\right)\cdots d\left(2^{2^{a-1}b}+1\right)$$But every term in the RHS is even then $2^{a+1}\mid \text{RHS}$ but the LHS is $n$

Thus it suffices to check the cases when $b=1$ or $b=3$

  • If $b=1$ then $n=2^a$, we want
    $$2^a=d(2^n-1)=d(1)\cdot d(2^1+1)\cdot d\left(2^{2^1 }+1\right)\cdots d\left(2^{2^{a-1}}+1\right)$$But as any number has at least $2$ divisor then every number in the RHS has to be prime which by Fermat numbers $a\leq5$
    here the answer are $\boxed{n=1,2,4,8,16,32}$
  • If $b=3$ then $n=2^a\cdot 3$, we want
    $$2^a\cdot 3=d(2^n-1)=d(7)\cdot d(2^3+1)\cdot d\left(2^{2^1\cdot 3}+1\right)\cdots d\left(2^{2^{a-1}\cdot 3}+1\right)$$As before, every term has more than $2$ divisors but if exist some number in the product with four divisors it can satisfies, which occurs at $a=2$ so only $n=3,6$ can satisfies but only $\boxed{n=6}$ gives a solution.
So the solutions are $\boxed{n=1,2,4,8,16,32,6}$
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
#55
Y by
The answer is $n = \boxed{1,2,4,6,8,16,32}$, which can be checked to work with Fermat's primes.

Let $n=2^a \cdot k$ for an odd $k$. We have

\[2^n-1 = (2^a-1)(2^a+1)(2^{2^1 \cdot k}+1)\dots (2^{2^{a-1} \cdot k}+1)\]
Suppose that $k \ge 5$.

It is relatively simple to prove that the terms are pairwise relatively prime, and Mihailescu shows that none of the terms are perfect squares. Hence,

\[\nu_2(\tau(2^n-1)) = \nu_2(\tau(2^n-1))+\sum_{i=0}^{a-1} \nu_2(\tau(2^{2^i \cdot k})) \ge a+1.\]
This means that $k=1,3$. The answers follow.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shendrew7
794 posts
#56
Y by
Our answers are $\boxed{1,2,4,6,8,16,32}$. First note, by Catalan Conjecture for instance, the only values of $m$ for which $2^m-1$ and $2^m+1$ are perfect squares are $m=1$ and $m=3$, respectively, so odd $n>1$ all fail. If we suppose $n=2^ab$, where $b$ is odd, then
\[2^{2^ab}-1 = \left(2^{2^{a-1}b}+1\right) \left(2^{2^{a-2}b}+1\right) \ldots \left(2^b+1\right) \left(2^b-1\right).\]
Each of the factors are pairwise relatively prime, so we can invoke the multiplicativity of $\tau$. Besides the edge cases $b=1,3$ mentioned earlier, which gives us the solutions above, we know for each factor $f$,
\[v_2(\tau(f)) \ge 1  \implies v_2(\tau(2^n-1)) \ge a+1 > v_2(n) \text{, contradiction. } \blacksquare\]
This post has been edited 1 time. Last edited by shendrew7, Mar 2, 2024, 7:02 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
peppapig_
281 posts
#57
Y by
I claim that the only possible $n$ are $1$, $2$, $4$, $6$, $8$, $16$, and $32$. These clearly work through factoring.

C1: I now claim that all working $n>1$ must be even. This is because if $n>1$ is odd, then this implies that $2^n-1$ is a perfect square. However, note that since $n\geq3$, this means that $2^n-1$ is $3$ mod $4$, meaning that it cannot possibly be a perfect square. Therefore, if we let $n=2^kq$, we can factor $2^n-1$ as
\[2^n-1=(2^q-1)(2^q+1)(2^{2q}+1)\dots(2^{2^{(k-1)}q}+1),\]all of which I claim are relatively prime. I will prove as such in the following two claims.

C2: I claim that $2^q-1$ and $2^{2^mq}+1$ are always relatively prime for all positive integers $m$. This is because if a prime $p\mid 2^q-1$, this implies that $p\mid 2^{2^mq}-1$. However, by Euclidean Algorithm, since both $2^{2^mq}-1$ and $2^{2^mq}+1$ are odd, this means that they are relatively prime. Therefore no prime $p$ dividing $2^q-1$ divides $2^{2^mq}+1$, meaning that the two are relatively prime.

C3: I claim that for any two positive integers $m<n$, $2^{2^mq}+1$ and $2^{2^nq}+1$ are relatively prime. This is because if a prime $p\mid 2^{2^mq}+1$, then we have
\[2^{2^nq}-1 \equiv 0\mod p,\]since $m<n$ and we can expand using difference of squares. Therefore, this means that $2^{2^nq}+1$ must be $2$ mod $p$. However, since $2^{2^mq}+1$ is odd, this implies that $2$ mod $p$ is not $0$ mod $p$, meaning that no prime $p$ dividing $2^{2^mq}+1$ divides $2^{2^nq}+1$, meaning that the two are relatively prime.

Therefore, all terms of this expansion are relatively prime. If we let $d(x)$ be the divisor function, this implies that
\[n=d(2^n-1)=d(2^q-1)*d(2^q+1)*d(2^{2q}+1)*\dots*d(2^{2^{(k-1)}q}+1).\]However, note that there are $k+1$ terms multiplied together and $\nu_2(n)=k$, implying that one of $d(2^{2^mq}+1)$ or $d(2^q-1)$ must be odd, implying that one of $2^{2^mq}+1$ or $2^q-1$ must be a perfect square. However, if $2^mq$ is even, then that implies that $2^{2^mq}+1$ cannot be a perfect square. Therefore, we consider $2^q+1$ and $2^q-1$.

C4: Note that if $2^q-1$ is a perfect square, then $q$ must be $1$, otherwise if $q\geq2$, we would get that $2^q-1$ is $3$ mod $4$, making it impossible to be a perfect square. Setting $q=1$, we get that
\[2^k=d(1)*d(2^1+1)*d(2^2+1)*\dots*d(2^{2^{k-1}}+1),\]which implies that every term must have exactly $2$ factors, otherwise we'd not get $2^k$ as our answer. Therefore every term must be prime, and using Fermat Primes, we get that our only solutions using this are $1$, $2$, $4$, $8$, $16$, and $32$.

C5: Now if $2^q+1$ is a perfect square, by Mihâilescu's Theorem/Catalan's Conjecture, we can get that the only possible $q$ here is $q=3$. Therefore, if we have $q=3$, we then have
\[3*2^k=d(7)*d(2^3+1)*d(2^{3*2}+1)*\dots*d(2^{3*2^{k-1}}+1),\]and note that again, each number contributes at least $+1$ to the $\nu_2$ of the product. If there is one term with more than $+1$ to the $\nu_2$ (meaning the $d(2^{3*2^m}+1)$ is divisible by $4$), then all $k\geq m$ will have too high of a $\nu_2$ in its product, not allowing them to be solutions. Since $\nu_2(d(2^6+1))=4$, we have that $n=3*2^k$ with $k\geq 2$ do not work. This gives us the only possible solutions are $n=3$ and $n=6$, the former of which is extraneous by (C1).

Therefore our only solutions are $1$, $2$, $4$, $6$, $8$, $16$, and $32$, finishing the problem.
This post has been edited 2 times. Last edited by peppapig_, Mar 14, 2024, 6:11 PM
Reason: Typo
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
#58
Y by
megarnie wrote:
Find all integers $n\ge1$ such that $2^n-1$ has exactly $n$ positive integer divisors.

Proposed by Ankan Bhattacharya

im actually malding on 45 moh. time to do trivial problems.

Write $n=2^e\cdot o$. We obtain
\[2^n-1=(2^{n/2}+1)(2^{n/4}+1)\dots(2^{n/2^e}+1)(2^{n/2^e}-1).\]These are all pairwise relatively prime. If none are a square, then
\[e=\nu_2(n)=\nu_2(d(2^n-1))\ge e+1\]which fails. Hence one of these is a square, and it must clearly be one of the last two terms: one of $2^o+1$ and $2^o-1$ is a square.

If $o\ge 3$ then the square must be $9$ and $o=3$ by Mihailescu.

Else $o=1$. At this point we can just induct upwards.
  • $n=1$ works.
  • $n=2$ works.
  • $n=4$ works.
  • $n=8$ works.
  • $n=16$ works.
  • $n=32$ works.
  • $n=64$ fails as $2^{32}+1$ is not prime, and everything above must fail too.
Also we have
  • $n=3$ fails.
  • $n=6$ works.
  • $n=12$ fails as $65$ is not prime, and everything above must fail too.
Final solution set is $\{1,2,4,8,16,32,6\}$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ilikeminecraft
614 posts
#59
Y by
I claim the answer is $\boxed{1, 2, 4, 6, 8, 16, 32}.$ This is easily verifiable. I will now prove these are the only ones.

Let $\nu_2(n) = m, n = 2^m \cdot k.$ Thus, $$2^n - 1 = 2^{2^mk} - 1 = (2^{k }  - 1)(2^k + 1)(2^{2k} + 1)\cdots(2^{2^{m - 1}k} - 1)$$I claim that any 2 terms on the RHS are relatively prime. First, we have that $(2^k - 1, 2^{2^ik} + 1) = (2^k - 1, 2) = 1.$ Now, let $0 < i < j < k.$ $(2^{2^ik} + 1, 2^{2^{j}k} + 1) = (2^{2^{ik}} + 1, 2) = 1.$ Thus, they are relatively prime.

By Catalan's conjecture, we have that $2^n - 1$ is only a perfect square when $n = 1,$ and $2^n + 1$ is a perfect square when $n = 3.$ Thus, if $k\geq5,$ the number of divisors on the RHS is divisible by $m + 1$ even integers. However, we know that $\nu_2(n) = m,$ which is a contradiction. We will now focus on $k = 1, 3.$

If $k = 3,$ we see that $n = 6$ is a solution. I claim that there are no more. At $n = 12,$ we have that $2^6 + 1 = 65 = 5\cdot13.$ Hence, the number of divisors of $2^{12} - 1$ is 24. We prove the rest with induction. Let $n = 3\cdot2^m.$ Assume that the number of divisors of $n$ is $\geq n.$ By Zsigmondy, we have that there exists a prime dividing $2^{3\cdot2^{m + 1}} - 1$ that adoesn't divide $2^{3\cdot2^{m}} - 1.$ Hence, the number of divisors at minimum doubles, while $n$ also doubles. Hence, there is no solution.

If $k = 1,$ by similar reasoning, we only have solutions up to $m = 5.$
Z K Y
N Quick Reply
G
H
=
a