Plan ahead for the next school year. Schedule your class today!

G
Topic
First Poster
Last Poster
k a July Highlights and 2025 AoPS Online Class Information
jwelsh   0
Jul 1, 2025
We are halfway through summer, so be sure to carve out some time to keep your skills sharp and explore challenging topics at AoPS Online and our AoPS Academies (including the Virtual Campus)!

[list][*]Over 60 summer classes are starting at the Virtual Campus on July 7th - check out the math and language arts options for middle through high school levels.
[*]At AoPS Online, we have accelerated sections where you can complete a course in half the time by meeting twice/week instead of once/week, starting on July 8th:
[list][*]MATHCOUNTS/AMC 8 Basics
[*]MATHCOUNTS/AMC 8 Advanced
[*]AMC Problem Series[/list]
[*]Plus, AoPS Online has a special seminar July 14 - 17 that is outside the standard fare: Paradoxes and Infinity
[*]We are expanding our in-person AoPS Academy locations - are you looking for a strong community of problem solvers, exemplary instruction, and math and language arts options? Look to see if we have a location near you and enroll in summer camps or academic year classes today! New locations include campuses in California, Georgia, New York, Illinois, and Oregon and more coming soon![/list]

MOP (Math Olympiad Summer Program) just ended and the IMO (International Mathematical Olympiad) is right around the corner! This year’s IMO will be held in Australia, July 10th - 20th. Congratulations to all the MOP students for reaching this incredible level and best of luck to all selected to represent their countries at this year’s IMO! Did you know that, in the last 10 years, 59 USA International Math Olympiad team members have medaled and have taken over 360 AoPS Online courses. Take advantage of our Worldwide Online Olympiad Training (WOOT) courses
and train with the best! Please note that early bird pricing ends August 19th!
Are you tired of the heat and thinking about Fall? You can plan your Fall schedule now with classes at either AoPS Online, AoPS Academy Virtual Campus, or one of our AoPS Academies around the US.

Our full course list for upcoming classes is below:
All classes start 7:30pm ET/4:30pm PT unless otherwise noted.

Introductory: Grades 5-10

Prealgebra 1 Self-Paced

Prealgebra 1
Wednesday, Jul 16 - Oct 29
Sunday, Aug 17 - Dec 14
Tuesday, Aug 26 - Dec 16
Friday, Sep 5 - Jan 16
Monday, Sep 8 - Jan 12
Tuesday, Sep 16 - Jan 20 (4:30 - 5:45 pm ET/1:30 - 2:45 pm PT)
Sunday, Sep 21 - Jan 25
Thursday, Sep 25 - Jan 29
Wednesday, Oct 22 - Feb 25
Tuesday, Nov 4 - Mar 10
Friday, Dec 12 - Apr 10

Prealgebra 2 Self-Paced

Prealgebra 2
Friday, Jul 25 - Nov 21
Sunday, Aug 17 - Dec 14
Tuesday, Sep 9 - Jan 13
Thursday, Sep 25 - Jan 29
Sunday, Oct 19 - Feb 22
Monday, Oct 27 - Mar 2
Wednesday, Nov 12 - Mar 18

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Tuesday, Jul 15 - Oct 28
Sunday, Aug 17 - Dec 14
Wednesday, Aug 27 - Dec 17
Friday, Sep 5 - Jan 16
Thursday, Sep 11 - Jan 15
Sunday, Sep 28 - Feb 1
Monday, Oct 6 - Feb 9
Tuesday, Oct 21 - Feb 24
Sunday, Nov 9 - Mar 15
Friday, Dec 5 - Apr 3

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Wednesday, Jul 2 - Sep 17
Sunday, Jul 27 - Oct 19
Monday, Aug 11 - Nov 3
Wednesday, Sep 3 - Nov 19
Sunday, Sep 21 - Dec 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Friday, Oct 3 - Jan 16
Sunday, Oct 19 - Jan 25
Tuesday, Nov 4 - Feb 10
Sunday, Dec 7 - Mar 8

Introduction to Number Theory
Tuesday, Jul 15 - Sep 30
Wednesday, Aug 13 - Oct 29
Friday, Sep 12 - Dec 12
Sunday, Oct 26 - Feb 1
Monday, Dec 1 - Mar 2

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Friday, Jul 18 - Nov 14
Thursday, Aug 7 - Nov 20
Monday, Aug 18 - Dec 15
Sunday, Sep 7 - Jan 11
Thursday, Sep 11 - Jan 15
Wednesday, Sep 24 - Jan 28
Sunday, Oct 26 - Mar 1
Tuesday, Nov 4 - Mar 10
Monday, Dec 1 - Mar 30

Introduction to Geometry
Monday, Jul 14 - Jan 19
Wednesday, Aug 13 - Feb 11
Tuesday, Aug 26 - Feb 24
Sunday, Sep 7 - Mar 8
Thursday, Sep 11 - Mar 12
Wednesday, Sep 24 - Mar 25
Sunday, Oct 26 - Apr 26
Monday, Nov 3 - May 4
Friday, Dec 5 - May 29

Paradoxes and Infinity
Mon, Tue, Wed, & Thurs, Jul 14 - Jul 16 (meets every day of the week!)
Sat & Sun, Sep 13 - Sep 14 (1:00 - 4:00 PM PT/4:00 - 7:00 PM ET)

Intermediate: Grades 8-12

Intermediate Algebra
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22
Friday, Aug 8 - Feb 20
Tuesday, Aug 26 - Feb 24
Sunday, Sep 28 - Mar 29
Wednesday, Oct 8 - Mar 8
Sunday, Nov 16 - May 17
Thursday, Dec 11 - Jun 4

Intermediate Counting & Probability
Sunday, Sep 28 - Feb 15
Tuesday, Nov 4 - Mar 24

Intermediate Number Theory
Wednesday, Sep 24 - Dec 17

Precalculus
Wednesday, Aug 6 - Jan 21
Tuesday, Sep 9 - Feb 24
Sunday, Sep 21 - Mar 8
Monday, Oct 20 - Apr 6
Sunday, Dec 14 - May 31

Advanced: Grades 9-12

Calculus
Sunday, Sep 7 - Mar 15
Wednesday, Sep 24 - Apr 1
Friday, Nov 14 - May 22

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)
Sunday, Aug 17 - Nov 9
Wednesday, Sep 3 - Nov 19
Tuesday, Sep 16 - Dec 9
Sunday, Sep 21 - Dec 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Oct 6 - Jan 12
Thursday, Oct 16 - Jan 22
Tues, Thurs & Sun, Dec 9 - Jan 18 (meets three times a week!)

MATHCOUNTS/AMC 8 Advanced
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)
Sunday, Aug 17 - Nov 9
Tuesday, Aug 26 - Nov 11
Thursday, Sep 4 - Nov 20
Friday, Sep 12 - Dec 12
Monday, Sep 15 - Dec 8
Sunday, Oct 5 - Jan 11
Tues, Thurs & Sun, Dec 2 - Jan 11 (meets three times a week!)
Mon, Wed & Fri, Dec 8 - Jan 16 (meets three times a week!)

AMC 10 Problem Series
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)
Sunday, Aug 10 - Nov 2
Thursday, Aug 14 - Oct 30
Tuesday, Aug 19 - Nov 4
Mon & Wed, Sep 15 - Oct 22 (meets twice a week!)
Mon, Wed & Fri, Oct 6 - Nov 3 (meets three times a week!)
Tue, Thurs & Sun, Oct 7 - Nov 2 (meets three times a week!)

AMC 10 Final Fives
Friday, Aug 15 - Sep 12
Sunday, Sep 7 - Sep 28
Tuesday, Sep 9 - Sep 30
Monday, Sep 22 - Oct 13
Sunday, Sep 28 - Oct 19 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, Oct 8 - Oct 29
Thursday, Oct 9 - Oct 30

AMC 12 Problem Series
Wednesday, Aug 6 - Oct 22
Sunday, Aug 10 - Nov 2
Monday, Aug 18 - Nov 10
Mon & Wed, Sep 15 - Oct 22 (meets twice a week!)
Tues, Thurs & Sun, Oct 7 - Nov 2 (meets three times a week!)

AMC 12 Final Fives
Thursday, Sep 4 - Sep 25
Sunday, Sep 28 - Oct 19
Tuesday, Oct 7 - Oct 28

AIME Problem Series A
Thursday, Oct 23 - Jan 29

AIME Problem Series B
Tuesday, Sep 2 - Nov 18

F=ma Problem Series
Tuesday, Sep 16 - Dec 9
Friday, Oct 17 - Jan 30

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, Aug 14 - Oct 30
Sunday, Sep 7 - Nov 23
Tuesday, Dec 2 - Mar 3

Intermediate Programming with Python
Friday, Oct 3 - Jan 16

USACO Bronze Problem Series
Wednesday, Sep 3 - Dec 3
Thursday, Oct 30 - Feb 5
Tuesday, Dec 2 - Mar 3

Physics

Introduction to Physics
Tuesday, Sep 2 - Nov 18
Sunday, Oct 5 - Jan 11
Wednesday, Dec 10 - Mar 11

Physics 1: Mechanics
Sunday, Sep 21 - Mar 22
Sunday, Oct 26 - Apr 26
0 replies
jwelsh
Jul 1, 2025
0 replies
k i Adding contests to the Contest Collections
dcouchman   1
N Apr 5, 2023 by v_Enhance
Want to help AoPS remain a valuable Olympiad resource? Help us add contests to AoPS's Contest Collections.

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


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


More specifically:

For new threads:


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

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


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

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


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


For answers to already existing threads:


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

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



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


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

The above rules will be applied from next monday (5. march of 2007).
Feel free to discuss on this here.
49 replies
ZetaX
Feb 27, 2007
NoDealsHere
May 4, 2019
Bonza functions
KevinYang2.71   32
N 2 minutes ago by vsamc
Source: 2025 IMO P3
Let $\mathbb{N}$ denote the set of positive integers. A function $f\colon\mathbb{N}\to\mathbb{N}$ is said to be bonza if
\[
f(a)~~\text{divides}~~b^a-f(b)^{f(a)}
\]for all positive integers $a$ and $b$.

Determine the smallest real constant $c$ such that $f(n)\leqslant cn$ for all bonza functions $f$ and all positive integers $n$.
32 replies
+3 w
KevinYang2.71
Today at 3:38 AM
vsamc
2 minutes ago
IMO 2025 P2
sarjinius   48
N 13 minutes ago by Zhaom
Source: 2025 IMO P2
Let $\Omega$ and $\Gamma$ be circles with centres $M$ and $N$, respectively, such that the radius of $\Omega$ is less than the radius of $\Gamma$. Suppose $\Omega$ and $\Gamma$ intersect at two distinct points $A$ and $B$. Line $MN$ intersects $\Omega$ at $C$ and $\Gamma$ at $D$, so that $C, M, N, D$ lie on $MN$ in that order. Let $P$ be the circumcentre of triangle $ACD$. Line $AP$ meets $\Omega$ again at $E\neq A$ and meets $\Gamma$ again at $F\neq A$. Let $H$ be the orthocentre of triangle $PMN$.

Prove that the line through $H$ parallel to $AP$ is tangent to the circumcircle of triangle $BEF$.
48 replies
+2 w
sarjinius
Today at 3:38 AM
Zhaom
13 minutes ago
Perfect square by rearranging digits
Timta27   1
N 14 minutes ago by cubres
Source: own
Let's call a natural number good if it has the following properties:

$-$ There are no zeros in the representation of this number;
$-$ This number is not a perfect square;
$-$ It is possible to rearrange the digits in this number to form a perfect square, but this rearrangement is unique.

For example, the numbers $46$ and $234$ are good.

Prove that there are infinitely many good numbers.
1 reply
Timta27
Yesterday at 8:43 PM
cubres
14 minutes ago
Problem of quadratic equation
Not__Infinity   2
N 16 minutes ago by RagvaloD
Let p(x) and q(x) be two quadratic polynomials with integer coefficients. Suppose they have a non rational zero in common. Show that p(x)=rq(x) for some rational number r.
2 replies
Not__Infinity
2 hours ago
RagvaloD
16 minutes ago
Positive reals FE with x^2023
a_507_bc   11
N 17 minutes ago by math-olympiad-clown
Source: BMO SL 2023 A6
Find all functions $f:\mathbb{R}^+ \rightarrow \mathbb{R}^+$, such that $$f(x^{2023}+f(x)f(y))=x^{2023}+yf(x)$$for all $x, y>0$.
11 replies
a_507_bc
May 3, 2024
math-olympiad-clown
17 minutes ago
AOPS MO Introduce
MathMaxGreat   92
N 20 minutes ago by JerryZYang
$AOPS MO$

Problems: post it as a private message to me or @jerryZYang, please post it in $LATEX$ and have answers

6 Problems for two rounds, easier than $IMO$

If you want to do the problems or be interested, reply ’+1’
Want to post a problem reply’+2’ and message me
Want to be in the problem selection committee, reply’+3’
92 replies
MathMaxGreat
Jul 12, 2025
JerryZYang
20 minutes ago
IMO ShortList 2001, geometry problem 1
orl   68
N 27 minutes ago by Kempu33334
Source: IMO ShortList 2001, geometry problem 1
Let $A_1$ be the center of the square inscribed in acute triangle $ABC$ with two vertices of the square on side $BC$. Thus one of the two remaining vertices of the square is on side $AB$ and the other is on $AC$. Points $B_1,\ C_1$ are defined in a similar way for inscribed squares with two vertices on sides $AC$ and $AB$, respectively. Prove that lines $AA_1,\ BB_1,\ CC_1$ are concurrent.
68 replies
orl
Sep 30, 2004
Kempu33334
27 minutes ago
Sunny lines
sarjinius   33
N 31 minutes ago by juckter
Source: 2025 IMO P1
A line in the plane is called $sunny$ if it is not parallel to any of the $x$axis, the $y$axis, or the line $x+y=0$.

Let $n\ge3$ be a given integer. Determine all nonnegative integers $k$ such that there exist $n$ distinct lines in the plane satisfying both of the following:
[list]
[*] for all positive integers $a$ and $b$ with $a+b\le n+1$, the point $(a,b)$ lies on at least one of the lines; and
[*] exactly $k$ of the $n$ lines are sunny.
[/list]
33 replies
+1 w
sarjinius
Today at 3:35 AM
juckter
31 minutes ago
Inspired by the slimshadyyy.3.60's one.
arqady   9
N 38 minutes ago by arqady
Let $a\geq b\geq c\geq0$ and $a^2+b^2+c^2+abc=4$. Prove that:
$$a+b+c+\frac{1}{\sqrt2}\left(\sqrt{a}-\sqrt{c}\right)^2\geq3.$$
9 replies
arqady
Apr 1, 2025
arqady
38 minutes ago
Problem 2 IMO 2005 (Day 1)
Valentin Vornicu   83
N 38 minutes ago by eg4334
Let $a_1,a_2,\ldots$ be a sequence of integers with infinitely many positive and negative terms. Suppose that for every positive integer $n$ the numbers $a_1,a_2,\ldots,a_n$ leave $n$ different remainders upon division by $n$.

Prove that every integer occurs exactly once in the sequence $a_1,a_2,\ldots$.
83 replies
Valentin Vornicu
Jul 13, 2005
eg4334
38 minutes ago
Partition set with equal sum and differnt cardinality
psi241   74
N an hour ago by Namura
Source: IMO Shortlist 2018 C1
Let $n\geqslant 3$ be an integer. Prove that there exists a set $S$ of $2n$ positive integers satisfying the following property: For every $m=2,3,...,n$ the set $S$ can be partitioned into two subsets with equal sums of elements, with one of subsets of cardinality $m$.
74 replies
psi241
Jul 17, 2019
Namura
an hour ago
Areas of triangles AOH, BOH, COH
Arne   74
N an hour ago by Kempu33334
Source: APMO 2004, Problem 2
Let $O$ be the circumcenter and $H$ the orthocenter of an acute triangle $ABC$. Prove that the area of one of the triangles $AOH$, $BOH$ and $COH$ is equal to the sum of the areas of the other two.
74 replies
Arne
Mar 23, 2004
Kempu33334
an hour ago
Colourful Queens
oVlad   6
N an hour ago by Fat0508
Source: 2020 RMM Shortlist C3
Determine the smallest positive integer $k{}$ satisfying the following condition: For any configuration of chess queens on a $100 \times 100$ chequered board, the queens can be coloured one of $k$ colours so that no two queens of the same colour attack each other.

Russia, Sergei Avgustinovich and Dmitry Khramtsov
6 replies
oVlad
Oct 8, 2022
Fat0508
an hour ago
IMO Genre Predictions
ohiorizzler1434   116
N an hour ago by InftyByond
Everybody, with IMO upcoming, what are you predictions for the problem genres?


Personally I predict: predict
116 replies
ohiorizzler1434
May 3, 2025
InftyByond
an hour ago
Binary multiples of three
tapir1729   8
N May 21, 2025 by Mathandski
Source: TSTST 2024, problem 5
For a positive integer $k$, let $s(k)$ denote the number of $1$s in the binary representation of $k$. Prove that for any positive integer $n$,
\[\sum_{i=1}^{n}(-1)^{s(3i)} > 0.\]Holden Mui
8 replies
tapir1729
Jun 24, 2024
Mathandski
May 21, 2025
Binary multiples of three
G H J
G H BBookmark kLocked kLocked NReply
Source: TSTST 2024, problem 5
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
tapir1729
71 posts
#1 • 1 Y
Y by Mathandski
For a positive integer $k$, let $s(k)$ denote the number of $1$s in the binary representation of $k$. Prove that for any positive integer $n$,
\[\sum_{i=1}^{n}(-1)^{s(3i)} > 0.\]Holden Mui
This post has been edited 1 time. Last edited by tapir1729, Jun 24, 2024, 9:34 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
The_Turtle
254 posts
#2 • 11 Y
Y by ihatemath123, Sedro, sami1618, aidan0626, iamnotgentle, OronSH, Ritwin, Diaoest, MatSeFner, CyclicISLscelesTrapezoid, Mathandski
My problem!
Original problem statement wrote:
Let $n$ be a positive integer. Prove that among the first $n$ multiples of three, there are more numbers with an even number of 1s in binary than numbers with an odd number of 1s in binary.

Solution A

Solution B

Solution C
This post has been edited 3 times. Last edited by The_Turtle, Jun 25, 2024, 5:50 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaoAOPS
1599 posts
#3
Y by
Badly cooked writeup, dm if fakesolve.


$k \le 2$ is obvious. We now claim that \[ a_n = \sum_{i=1}^n (-1)^{s(3i)} \ge 3 \]for all $k \ge 3$. Take the base case of $k = 3, \dots, 11$.

Claim: We have that \[ \sum_{i=0, 3 \mid (i+j)}^{2^{2n}-1} (-1)^{s(i)} = \varepsilon(j) \cdot 3^{n-1} \]where $\varepsilon(3k) = 2, \varepsilon(3k+1) = \varepsilon(3k+2) = -1$.
Proof. Take $(1 + xy)^n(1 + xy^2)^n$, ROUF of degree $3$ on $y$ and sub $x = -1$. $\blacksquare$
Then, for a fixed $k = 2^{2a} b + r, j \in \{0, 1, 2\}, r \le 2^a - 1$, we have that \begin{align*} \sum_{i=0, 3 \mid i}^{2^{2a} b + r} (-1)^{s(3i)} &= \sum_{i=0}^{b} \sum_{j=0, 3 \mid 2^a i + j}^{\min\{2^{2a} - 1, r\}} (-1)^{s(i) + s(j)} \\ &\ge \sum_{i=0}^{b} \varepsilon(i) (-1)^{s(i)} 3^{a-1} - (2^{2a} - 1) \\ &\ge \sum_{i=0}^{b} (\varepsilon(i) + 1) (-1)^{s(i)} 3^{a-1} - (3^{a-1} + 2^{2a} - 1) \\ &= \sum_{i=0, 3 \mid i}^{b} (-1)^{s(i)} 3^a - (3^{a-1} + 2^{2a} - 1) = 3^a \cdot a_b - (3^{a-1} + 2^{2a} - 1) \\ \end{align*}where $r = k - 2^a i$ is a remainder and $t \in \{0, 1, 2\}$
Then note that if $a_b \ge 3$ and $a = 1$, it follows that $3^a \cdot a_b - (3^{a-1} + 2^a - 1) \ge 3$. The result follows by induction.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MarkBcc168
1602 posts
#4
Y by
Probably a very bad writeup, but whatever.

We define
$$S_r(a,b) = \sum_{\substack{n\in [a,b) \\ n\equiv r\ (\text{mod } 3)}} (-1)^{s_2(n)}
\quad\text{and}\quad S_r(n) = S_r(0,n).$$Notice the use of half-open interval so that $S_r(a,c) =S_r(a,b)+S_r(b,c)$. The problem is equivalent to showing that $S_0(n+1)>1$ for all $n$ that is a multiple of $3$.
Lemma. For any positive integer $n$, the following table displays the values of $S_i(2^n)$ for $i=0,1,2$.
$$\begin{tabular}{c|ccc}
$n$ & $S_0(2^n)$ & $S_1(2^n)$ & $S_2(2^n)$ \\ \hline
$2k-1$ & $3^{k-1}$ & $-3^{k-1}$ & 0 \\
$2k$ & $2\cdot 3^{k-1}$ & $-3^{k-1}$ & $-3^{k-1}$
\end{tabular}$$
Proof. Routine computation, either by induction or by generating functions. $\blacksquare$
We will now prove the problem. Take a binary expansion of $n+1$:
$$n+1 = a_\ell\cdot 2^\ell+ a_{\ell-1}\cdot 2^{\ell-1} + \dots + a_0\cdot 2^0
\quad a_i\in\{0,1\}$$We also define
$$t_{\ell+1}=0 \qquad t_i = a_\ell\cdot 2^\ell + a_{\ell-1}\cdot 2^{\ell-1} + \dots + a_i\cdot 2^i.$$Thus, we may split the summation $S_0(n)$ into blocks
$$S_0(n) = \sum_{i=0}^{\ell} S_0(t_{i+1}, t_i)
= \sum_{i=0}^{\ell} T_i,$$where $T_i = S_0(t_{i+1}, t_i) = S_0(t_{i+1}, t_{i+1}+a_i\cdot 2^i)$. Observe that if $a_i=0$, then $T_i=0$.

For nonzero blocks, the block in sum $T_i$ is of the size $2^{a_i}$, so we may apply the above lemma. However, we have the following claim that blocks some possibilities.
Claim. For any $k$, we have $T_{2k-1} + T_{2k} \geq -2\cdot 3^{k-1}$.

Proof. From the lemma, $T_i$ must correspond to one entry of the table in the lemma, its negation, or zero (if $a_i=0$), depending on the parity of $s_2(t_i)$ and $t_i\bmod 3$. In particular, to violate the inequality, we must have
$$a_{2k-1}=a_{2k}=1,\quad T_{2k-1} = -3^{k-1},\quad T_{2k} = -2\cdot 3^{k-1}.$$We show that this is impossible.

The last equality implies $t_{2k+1}\equiv 0\pmod 3$ and $s_2(t_{2k+1})$ is even. Thus, $s_2(t_{2k})$ is odd and $t_{2k} = t_{2k+1}+2^{2k}\equiv 1\pmod 3$. This means that when counting $S_0(t_{2k}, t_{2k}+2^{2k-1})$, the trailing $2k-1$ digits must be $2\pmod 3$ to count all multiples of $3$. This forces $T_{2k-1}=S_0(t_{2k}, t_{2k}+2^{2k-1}) = 0$ by the table, a contradiction. $\blacksquare$
The claim gives the following bounds:
\begin{align*}
T_1 + T_2 &\geq -2 \\
T_3 + T_4 &\geq -2\cdot 3^1 \\
T_5 + T_6 &\geq -2\cdot 3^2 \\ 
&\vdots
\end{align*}Moreover, note that $T_0 = S_0(n,n+1) \geq -1$. Now, we split into two cases.
  • If $\boldsymbol \ell$ is even, then set $\ell=2m$, so
    $$T_{2m} = 2\cdot 3^m,\qquad T_{2m-1} \in \{0, S_0(2^{2m}, 2^{2m}+2^{2m-1})\} = 0,$$so we have
    \begin{align*}
S_0(n+1) &=T_0+\dots+T_{\ell}\\
&\geq 2\cdot 3^m - 2(3^{m-1}+3^{m-2}+\dots+3^0)-1\\
&= 3^m-1\geq 2.
\end{align*}
  • If $\boldsymbol \ell$ is odd, then set $\ell=2m+1$, so
    $$T_{2m+1} = 2\cdot 3^{m+1},\quad T_{2m} \in \{0, S_0(2^{2m+1}, 2^{2m+1}+2^{2m})\} \in \{0, 3^m\},$$and $T_{2m-1}\geq -3^m$. Thus, we have
    \begin{align*}
S_0(n+1) &=T_0+\dots+T_{\ell} \\
&\geq 2\cdot 3^{m+1} - 3^m - 2(3^{m-1}+3^{m-2}+\dots+3^0) - 1 \\
&= 3^m \geq 3.
\end{align*}(Check $m=0$ manually).
This post has been edited 1 time. Last edited by MarkBcc168, Jun 24, 2024, 7:52 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
kred9
1022 posts
#5 • 1 Y
Y by IAmTheHazard
Very nice. Let $S(n) = \sum_{i=1}^n (-1)^{s(3i)}$.

First, we claim that $S(8k) = 3S(2k)$ for all positive integers $k$.
Proof. Consider 8 consecutive multiples of 3. Their last three digits look like this:
$000, 011, 110, 001, 100, 111, 010, 101$.

Now, partition those 8 tails into the three sets $\{000, 011, 110\}, \{001, 100, 111\}, \{010, 101\}$. In each of the sets, the heads of each of those tails will be the same. Therefore, in the first set, either all three numbers have an odd digit sum or an even digit sum. Similarly, in the second set, all three numbers have an odd digit sum or an even digit sum, and in the third set, the digit sums are opposite parity.

Therefore, the sum of $(-1)^{s(j)}$ is just
\begin{align*}
\sum_{j = 8k}^{8k+7} (-1)^{s(j)} &= (-1)^{s(\text{head}000)}+(-1)^{s(\text{head}011)}+(-1)^{s(\text{head}110)}+(-1)^{s(\text{head}001)}+(-1)^{s(\text{head}100)}+(-1)^{s(\text{head}111)}+(-1)^{s(\text{head}010)}+(-1)^{s(\text{head}101)} \\
&= \left((-1)^{s(\text{head}000)}+(-1)^{s(\text{head}011)}+(-1)^{s(\text{head}110)}\right)+\left((-1)^{s(\text{head}001)}+(-1)^{s(\text{head}100)}+(-1)^{s(\text{head}111)}\right)+\left((-1)^{s(\text{head}010)}+(-1)^{s(\text{head}101)} \right) \\
&= 3\left((-1)^{s(\text{head}000)} + (-1)^{s(\text{head}100)}\right) \\
&= 3\left((-1)^{s(\text{head}0)} + (-1)^{s(\text{head}1)}\right). \\
\end{align*}
The claim is quite apparent to see from here, because we have reduced every set of 8 consecutive numbers into a set of 2 consecutive numbers, while multiplying by $3$. $\blacksquare$

Base cases show that all of the $S(i)$ from 1 to 8 are positive. Now by $S(8k) = 3S(2k) > 0$ for $k\ge 2$. Additionally, $S(2k)$ is even and positive, so $S(8k) \ge 3\cdot 2 = 6$. Furthermore, $S(8k + 8)$ is also at least $6$, meaning $S(8k+6)$ is also at least $6$. It is obvious now that $S(8k+3)$ can't be less than $3$, since $S(8k+3) = S(8k) \pm 3$. We are done. $\square$

Remark. We can actually improve on many of these bounds quite easily, since $S(k) \ge 3$ for all $k \ge 3$ implies that $S(8k) = 3S(2k) \ge 12$, since $S(2k)$ must be even and at least $3$ for all $k\ge 2$. Therefore $S(8k+3) \ge 9$ for all $k \ge 2$. Then we can repeat in this fashion to get larger and larger bounds on $S(k)$. The graph of $S$ also looks interesting, attached below from $n = 1$ to $2^{23}$.
Remark 2. Of course, as soon as I read this problem, I thought of the following problem:
2022 HMMT November Guts #26 wrote:
Compute the smallest multiple of 63 with an odd number of ones in its base two representation.
Proposed by: Holden Mui
Attachments:
This post has been edited 1 time. Last edited by kred9, Jun 24, 2024, 8:21 PM
Reason: improved readability
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
a1267ab
224 posts
#6 • 4 Y
Y by GrantStar, OronSH, khina, CyclicISLscelesTrapezoid
Bonus:

Prove that
\[\sum_{i=1}^n (-1)^{s(1434i)} > 0\]for all positive integers $n$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pikapika007
308 posts
#7 • 4 Y
Y by YaoAOPS, yofro, IAmTheHazard, Phorphyrion
Thanks to YaoAOPS for the writeup.

Define
\[
    f(k) = \sum_{i=0, i \equiv k \pmod{3}}^{k} (-1)^i.
\]
This $f$ satisfies the same conditions as in ISL 2008 A4 by direct checking, so using post #10 there, we get $f(3p) \ge 2$ for $p \ge 2$. Since we also have $f(3) \ge 2$, we are done.
This post has been edited 7 times. Last edited by pikapika007, Jun 25, 2024, 4:17 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IAmTheHazard
5006 posts
#8
Y by
you thought 5 inductive cases was bad? well now i have $\Theta(\log n)$. too lazy to do an actual writeup

small $n$ is easy. now note that $3(2^n-1)$ in binary is $10\underbrace{1\ldots 1}_{n-2 \text{ ones}}01$ except for $n=1$ where it's $11$. the idea is to split the binary rep of $k$ into blocks of consecutive ones and note that the interaction (via carrying) between different blocks upon multiplication by $3$ is pretty limited. we are going to first WLOG $n$ is odd and split the numbers at most $n$ into groups by the last few digits:
  • $00$ and $01$ are in a group
  • If $B$ is a block of size at least $2$, then $B0$ and $B1$ are in a group
  • $010$ and $011$ are in a group
In the first group we pair up $s00$ and $s01$ and note that these both have the same digit sum parity as $s$ does ($s$ is a binary string) and we can induct down (handle $1$ separately; $3$ has even digit sum anyways). In the latter note that $s0$ and $s1$ will actually have opposite digit sum parity because of what $3(2^n-1)$ looks like: importantly, because $B$ has at least $2$ digits, changing between $B0$ and $B1$ doesn't change the largest $1$ bit's position so the behavior of carrying doesn't change. Thus these numbers don't contribute anything in either direction.

The last case is a bit of a headache because now carries start to occur. Numbers in this class either end in $110101\ldots 0101d$ or $00101\ldots 0101d$ where $d$ is a single digit. Consider a given choice of digits except for the rightmost. Simulating the carrying process, if the number falls in the former case it's not hard to see that the two choice of $d$ result in different digit sum parities, and in the latter the two choices of $d$ have the same digit sum parity. Moreover $11 \times 00101\ldots 0101d$ actually has even digit sum, so $s00101\ldots 0101d$ and $s$ have the same digit sum and we can once again induct down (again handling $s=0$ separately since $00101\ldots 0101d$ yields even digit sum anyways).

In summary, some groups/"subgroups" we split into have more even digit sums than odds (these are the ones where we induct), and some have exactly the same, so the desired claim is true for $n$ as well. We still need to handle $n$ even, but for non-tiny $n$ this can simply be achieved by looking at our proof for $n-1$ and noting that e.g. the $00$ and $01$ group will actually yield at least $3$ more even sums than odd and $3-1>0$ still.
This post has been edited 1 time. Last edited by IAmTheHazard, Jun 26, 2024, 9:29 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mathandski
776 posts
#9
Y by
Subjective Difficulty Rating

The Sol 3 version of the lemma can be proved with the Sol 2 genfunc idea too
The_Turtle wrote:
Lemma. For any every integer $d$, $S_r(0, 2^d)$ is given by
\begin{align*}
	S_0(0, 2^d) &= \begin{cases}
    	3^{\frac{d-1}{2}} & \text{$d$ odd} \\
        2 \cdot 3^{\frac{d-2}{2}} & \text{$d$ even}
    \end{cases} \\
    S_1(0, 2^d) &= \begin{cases}
    	-3^{\frac{d-1}{2}} & \text{$d$ odd} \\
        -3^{\frac{d-2}{2}} & \text{$d$ even}
    \end{cases} \\
    S_2(0, 2^d) &= \begin{cases}
    	0 & \text{$d$ odd} \\
        -2 \cdot 3^{\frac{d-2}{2}} & \text{$d$ even}
    \end{cases}
\end{align*}

Note that $\overline{d_1 d_2 \dots d_n} \equiv a \pmod{3}$ if and only if,
\[d_n - d_{n-1} + d_{n-2} - \dots \equiv a \pmod{3}\]Furthermore, the sum of digits is even if and only if,
\[d_1 + d_2 + \dots + d_n \equiv 0 \pmod{2}\]\[\iff d_n - d_{n-1} + d_{n-2} - \dots \equiv 0 \pmod{2}\]Both are satisfied if and only if $d_n - d_{n-1} + d_{n-2} - \dots \equiv$ some $b$ mod 6. We may then use one of the polynomials,
\[f(x) = x^{-b} (x+1)^{\frac{n+1}{2}} (\frac1x + 1)^{\frac{n-1}{2}}\]\[f(x) = x^{-b} (x+1)^{\frac{n}{2}} (\frac1x + 1)^{\frac{n}{2}}\]Depending on parity of $n$. Using roots of unity filters...

Ends up being a pretty bashy 5-page writeup.
This post has been edited 4 times. Last edited by Mathandski, May 21, 2025, 4:28 PM
Reason: rerate MOHs
Z K Y
N Quick Reply
G
H
=
a