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
Max value of function with f(f(n)) < n+50
Rijul saini   6
N 8 minutes ago by guptaamitu1
Source: India IMOTC Day 3 Problem 2
Let $S$ be the set of all non-decreasing functions $f: \mathbb{N} \rightarrow \mathbb{N}$ satisfying $f(f(n))<n+50$ for all positive integers $n$. Find the maximum value of
$$f(1)+f(2)+f(3)+\cdots+f(2024)+f(2025)$$over all $f \in S$.

Proposed by Shantanu Nene
6 replies
Rijul saini
Jun 4, 2025
guptaamitu1
8 minutes ago
Final problem
Cats_on_a_computer   26
N 11 minutes ago by Not__Infinity
Source: Own
This is likely the last post I will make in my life.

Consider an 18 year old who has no purpose, talents, or friends; a living waste of space, an unsightly chthonic maggot with less of a right to live than a grasshopper. Note that this person is so desperate, he writes his suicide note on a math forum of all places, because nobody around him would bother reading one. We define a *solution* to this individual’s woes as a termination. What is the optimal play by this individual to reach a solution with the least amount of pain?

Solution (sketch): we construct a 1 dimensional CW-complex consisting of a single circle $S_1$, and an interval glued with one of its endpoints to the circle.

See you later, space cowboy…
26 replies
+2 w
Cats_on_a_computer
4 hours ago
Not__Infinity
11 minutes ago
Symmetric Tangents Concur on CD
ike.chen   44
N 18 minutes ago by Maths_VC
Source: ISL 2022/G3
Let $ABCD$ be a cyclic quadrilateral. Assume that the points $Q, A, B, P$ are collinear in this order, in such a way that the line $AC$ is tangent to the circle $ADQ$, and the line $BD$ is tangent to the circle $BCP$. Let $M$ and $N$ be the midpoints of segments $BC$ and $AD$, respectively. Prove that the following three lines are concurrent: line $CD$, the tangent of circle $ANQ$ at point $A$, and the tangent to circle $BMP$ at point $B$.
44 replies
ike.chen
Jul 9, 2023
Maths_VC
18 minutes ago
Product of cosine
Oksutok   0
20 minutes ago
Source: 7th Liu Hui Cup P3
Let
$$S=\prod_{1\le k \le 35}4\left(\cos^2\frac{2k\pi}{5}+\cos^2\frac{2k\pi}{7}\right)$$Show that $S$ is a positive integer, and compute the sum of all positive prime factors of $S$.
0 replies
Oksutok
20 minutes ago
0 replies
Korea csat problem, so-called “Killer problem”..
darrime627   0
2 hours ago
Find the values of \( a \) and \( b \) such that the function \( f(x) \), which has a second derivative for all \( x \in \mathbb{R} \), satisfies the following conditions:

\[
(\gamma) \quad [f(x)]^5 + [f(x)]^3 + ax + b = \ln \left( x^2 + x + \frac{5}{2} \right)
\]
\[
(\delta) \quad f(-3) f(3) < 0, \quad f'(2) > 0
\]
0 replies
darrime627
2 hours ago
0 replies
a cute combinatorics (?) problem
pzzd   6
N 2 hours ago by pzzd
here’s a cute little problem that can be solved with binomial coefficients, but is also related to some very common sequences in mathematics :3

say you have a $2$-inch-wide rectangle of some length $l$, and a bunch of $2$x$1$ dominos. how many different ways can you completely cover the rectangle with dominos? you can place the dominos horizontally or vertically - for example, for a $2$-by-$3$ rectangle, a valid arrangement of dominos is $1$ vertical domino on the left and $2$ horizontal dominos on the right.

hope you find this interesting!
6 replies
pzzd
Yesterday at 2:48 PM
pzzd
2 hours ago
Nice recurrence finding remainder
Kyj9981   1
N 2 hours ago by Kyj9981
Source: PMO22 Areas Part II.2

Let $a_1, a_2, \dots$ be a sequence of integers defined by $a_1 = 3$, $a_2 = 3$, and $a_{n+2} = a_{n+1}a_n - a_{n+1} - a_n + 2$ for all $n \geq 1$. Find the remainder when $a_{2020}$ is divided by $22$.
1 reply
Kyj9981
2 hours ago
Kyj9981
2 hours ago
Weird parity (idk maybe) problem
Ro.Is.Te.   0
2 hours ago
Given the equation:
$\frac{1}{x - y - z} = \frac{1}{y} + \frac{1}{z}$
How many ordered triples $(x,y,z)$ are either prime numbers or the negatives of prime numbers?
0 replies
Ro.Is.Te.
2 hours ago
0 replies
Sum of recurrence
Kyj9981   1
N 3 hours ago by Kyj9981
source: Sipnayan SHS Elims 2018/V1

Let $s_0=6$, $s_1=6$, and $s_n=2s_{n-1}+8s_{n-2}$ for $n \geq 2$. Define
\[A_n=\sum_{i=0}^n s_{i}\]Find $A_{2018}$. Express your answer in the form $a^b+c^d$, where $a$, $b$, $c$, and $d$ are positive integers.
1 reply
Kyj9981
3 hours ago
Kyj9981
3 hours ago
[PMO27 Areas] I.13 are you sure
BinariouslyRandom   4
N 4 hours ago by Kyj9981
The sequence of real numbers $x_1, x_2, \dots$, satisfies the recurrence relation
\[ \frac{x_{n+1}}{x_n} = \frac{(x_{n+1})^2 + 27}{x_n^2 + 27} \]for all positive integers $n$. Suppose that $x_{20} = x_{25} = 3$. Let $M$ be the maximum value of
\[ \sum_{n=1}^{2025} x_n. \]What is $M \pmod{1000}$?
4 replies
BinariouslyRandom
Jan 25, 2025
Kyj9981
4 hours ago
Challenge: Make as many positive integers from 2 zeros
Biglion   25
N 4 hours ago by littleduckysteve
How many positive integers can you make from at most 2 zeros, any math operation and cocatination?
New Rule: The successor function can only be used at most 3 times per number
Starting from 0, 0=0
25 replies
Biglion
Jul 2, 2025
littleduckysteve
4 hours ago
10 Problems
Sedro   9
N 4 hours ago by fruitmonster97
Title says most of it. I've been meaning to post a problem set on HSM since at least a few months ago, but since I proposed the most recent problems I made to the 2025 SSMO, I had to wait for that happen. (Hence, most of these problems will probably be familiar if you participated in that contest, though numbers and wording may be changed.) The problems are very roughly arranged by difficulty. Enjoy!

Problem 1: An increasing sequence of positive integers $u_1, u_2, \dots, u_8$ has the property that the sum of its first $n$ terms is divisible by $n$ for every positive integer $n\le 8$. Let $S$ be the number of such sequences satisfying $u_1+u_2+\cdots + u_8 = 144$. Compute the remainder when $S$ is divided by $1000$.

Problem 2: Rhombus $PQRS$ has side length $3$. Point $X$ lies on segment $PR$ such that line $QX$ is perpendicular to line $PS$. Given that $QX=2$, the area of $PQRS$ can be expressed as $\tfrac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Compute $m+n$.

Problem 3: Positive integers $a$ and $b$ satisfy $a\mid b^2$, $b\mid a^3$, and $a^3b^2 \mid 2025^{36}$. If the number of possible ordered pairs $(a,b)$ is equal to $N$, compute the remainder when $N$ is divided by $1000$.

Problem 4: Let $ABC$ be a triangle. Point $P$ lies on side $BC$, point $Q$ lies on side $AB$, and point $R$ lies on side $AC$ such that $PQ=BQ$, $CR=PR$, and $\angle APB<90^\circ$. Let $H$ be the foot of the altitude from $A$ to $BC$. Given that $BP=3$, $CP=5$, and $[AQPR] = \tfrac{3}{7} \cdot [ABC]$, the value of $BH\cdot CH$ can be expressed as $\tfrac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Compute $m+n$.

Problem 5: Anna has a three-term arithmetic sequence of integers. She divides each term of her sequence by a positive integer $n>1$ and tells Bob that the three resulting remainders are $20$, $52$, and $R$, in some order. For how many values of $R$ is it possible for Bob to uniquely determine $n$?

Problem 6: There is a unique ordered triple of positive reals $(x,y,z)$ satisfying the system of equations \begin{align*} x^2 + 9 &= (y-\sqrt{192})^2 + 4 \\ y^2 + 4 &= (z-\sqrt{192})^2 + 49 \\ z^2 + 49 &= (x-\sqrt{192})^2 + 9. \end{align*}The value of $100x+10y+z$ can be expressed as $p\sqrt{q}$, where $p$ and $q$ are positive integers such that $q$ is square-free. Compute $p+q$.

Problem 7: Let $S$ be the set of all monotonically increasing six-term sequences whose terms are all integers between $0$ and $6$ inclusive. We say a sequence $s=n_1, n_2, \dots, n_6$ in $S$ is symmetric if for every integer $1\le i \le 6$, the number of terms of $s$ that are at least $i$ is $n_{7-i}$. The probability that a randomly chosen element of $S$ is symmetric is $\tfrac{p}{q}$, where $p$ and $q$ are relatively prime positive integers. Compute $p+q$.

Problem 8: For a positive integer $n$, let $r(n)$ denote the value of the binary number obtained by reading the binary representation of $n$ from right to left. Find the smallest positive integer $k$ such that the equation $n+r(n)=2k$ has at least ten positive integer solutions $n$.

Problem 9: Let $p$ be a quadratic polynomial with a positive leading coefficient. There exists a positive real number $r$ such that $r < 1 < \tfrac{5}{2r} < 5$ and $p(p(x)) = x$ for $x \in \{ r,1,  \tfrac{5}{2r} , 5\}$. Compute $p(20)$.

Problem 10: Find the number of ordered triples of positive integers $(a,b,c)$ such that $a+b+c=995$ and $ab+bc+ca$ is a multiple of $995$.
9 replies
Sedro
Jul 10, 2025
fruitmonster97
4 hours ago
[PMO26 Qualifying II.12] Equality
kae_3   5
N 5 hours ago by fruitmonster97
The real numbers $x,y$ are such that $x\neq y$ and \[\frac{x}{26-x^2}=\frac{y}{26-y^2}=\frac{xy}{26-(xy)^2}.\]What is $x^2+y^2$?

$\text{(a) }626\qquad\text{(b) }650\qquad\text{(c) }677\qquad\text{(d) }729$

Answer Confirmation
5 replies
kae_3
Feb 21, 2025
fruitmonster97
5 hours ago
Trigonometry equation practice
ehz2701   8
N 6 hours ago by vanstraelen
There is a lack of trigonometric bash practice, and I want to see techniques to do these problems. So here are 10 kinds of problems that are usually out in the wild. How do you tackle these problems? (I had ChatGPT write a code for this.). Please give me some general techniques to solve these kinds of problems, especially set 2b. I’ll add more later.

Leaderboard

problem set 1a

problem set 2a

problem set 2b
answers 2b

General techniques so far:

Trick 1: one thing to keep in mind is

[center] $\frac{1}{2} = \cos 36 - \sin 18$. [/center]

Many of these seem to be reducible to this. The half can be written as $\cos 60 = \sin 30$, and $\cos 36 = \sin 54$, $\sin 18 = \cos 72$. This is proven in solution 1a-1. We will refer to this as Trick 1.
8 replies
ehz2701
Jul 12, 2025
vanstraelen
6 hours 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
1595 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
1600 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