We have your learning goals covered with Spring and Summer courses available. Enroll today!

G
Topic
First Poster
Last Poster
k a March Highlights and 2025 AoPS Online Class Information
jlacosta   0
Mar 2, 2025
March is the month for State MATHCOUNTS competitions! Kudos to everyone who participated in their local chapter competitions and best of luck to all going to State! Join us on March 11th for a Math Jam devoted to our favorite Chapter competition problems! Are you interested in training for MATHCOUNTS? Be sure to check out our AMC 8/MATHCOUNTS Basics and Advanced courses.

Are you ready to level up with Olympiad training? Registration is open with early bird pricing available for our WOOT programs: MathWOOT (Levels 1 and 2), CodeWOOT, PhysicsWOOT, and ChemWOOT. What is WOOT? WOOT stands for Worldwide Online Olympiad Training and is a 7-month high school math Olympiad preparation and testing program that brings together many of the best students from around the world to learn Olympiad problem solving skills. Classes begin in September!

Do you have plans this summer? There are so many options to fit your schedule and goals whether attending a summer camp or taking online classes, it can be a great break from the routine of the school year. Check out our summer courses at AoPS Online, or if you want a math or language arts class that doesn’t have homework, but is an enriching summer experience, our AoPS Virtual Campus summer camps may be just the ticket! We are expanding our locations for our AoPS Academies across the country with 15 locations so far and new campuses opening in Saratoga CA, Johns Creek GA, and the Upper West Side NY. Check out this page for summer camp information.

Be sure to mark your calendars for the following events:
[list][*]March 5th (Wednesday), 4:30pm PT/7:30pm ET, HCSSiM Math Jam 2025. Amber Verser, Assistant Director of the Hampshire College Summer Studies in Mathematics, will host an information session about HCSSiM, a summer program for high school students.
[*]March 6th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar on Math Competitions from elementary through high school. Join us for an enlightening session that demystifies the world of math competitions and helps you make informed decisions about your contest journey.
[*]March 11th (Tuesday), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS Chapter Discussion MATH JAM. AoPS instructors will discuss some of their favorite problems from the MATHCOUNTS Chapter Competition. All are welcome!
[*]March 13th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar about Summer Camps at the Virtual Campus. Transform your summer into an unforgettable learning adventure! From elementary through high school, we offer dynamic summer camps featuring topics in mathematics, language arts, and competition preparation - all designed to fit your schedule and ignite your passion for learning.[/list]
Our full course list for upcoming classes is below:
All classes run 7:30pm-8:45pm ET/4:30pm - 5:45pm PT unless otherwise noted.

Introductory: Grades 5-10

Prealgebra 1 Self-Paced

Prealgebra 1
Sunday, Mar 2 - Jun 22
Friday, Mar 28 - Jul 18
Sunday, Apr 13 - Aug 10
Tuesday, May 13 - Aug 26
Thursday, May 29 - Sep 11
Sunday, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
Wednesday, Jul 16 - Oct 29

Prealgebra 2 Self-Paced

Prealgebra 2
Tuesday, Mar 25 - Jul 8
Sunday, Apr 13 - Aug 10
Wednesday, May 7 - Aug 20
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21


Introduction to Algebra A Self-Paced

Introduction to Algebra A
Sunday, Mar 23 - Jul 20
Monday, Apr 7 - Jul 28
Sunday, May 11 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, May 14 - Aug 27
Friday, May 30 - Sep 26
Monday, Jun 2 - Sep 22
Sunday, Jun 15 - Oct 12
Thursday, Jun 26 - Oct 9
Tuesday, Jul 15 - Oct 28

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Sunday, Mar 16 - Jun 8
Wednesday, Apr 16 - Jul 2
Thursday, May 15 - Jul 31
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Wednesday, Jul 9 - Sep 24
Sunday, Jul 27 - Oct 19

Introduction to Number Theory
Monday, Mar 17 - Jun 9
Thursday, Apr 17 - Jul 3
Friday, May 9 - Aug 1
Wednesday, May 21 - Aug 6
Monday, Jun 9 - Aug 25
Sunday, Jun 15 - Sep 14
Tuesday, Jul 15 - Sep 30

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Sunday, Mar 2 - Jun 22
Wednesday, Apr 16 - Jul 30
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
Tuesday, Mar 4 - Aug 12
Sunday, Mar 23 - Sep 21
Wednesday, Apr 23 - Oct 1
Sunday, May 11 - Nov 9
Tuesday, May 20 - Oct 28
Monday, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
Monday, Jul 14 - Jan 19

Intermediate: Grades 8-12

Intermediate Algebra
Sunday, Mar 16 - Sep 14
Tuesday, Mar 25 - Sep 2
Monday, Apr 21 - Oct 13
Sunday, Jun 1 - Nov 23
Tuesday, Jun 10 - Nov 18
Wednesday, Jun 25 - Dec 10
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22

Intermediate Counting & Probability
Sunday, Mar 23 - Aug 3
Wednesday, May 21 - Sep 17
Sunday, Jun 22 - Nov 2

Intermediate Number Theory
Friday, Apr 11 - Jun 27
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
Sunday, Mar 16 - Aug 24
Wednesday, Apr 9 - Sep 3
Friday, May 16 - Oct 24
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8

Advanced: Grades 9-12

Olympiad Geometry
Wednesday, Mar 5 - May 21
Tuesday, Jun 10 - Aug 26

Calculus
Sunday, Mar 30 - Oct 5
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
Sunday, Mar 23 - Jun 15
Wednesday, Apr 16 - Jul 2
Friday, May 23 - Aug 15
Monday, Jun 2 - Aug 18
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

MATHCOUNTS/AMC 8 Advanced
Friday, Apr 11 - Jun 27
Sunday, May 11 - Aug 10
Tuesday, May 27 - Aug 12
Wednesday, Jun 11 - Aug 27
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Problem Series
Tuesday, Mar 4 - May 20
Monday, Mar 31 - Jun 23
Friday, May 9 - Aug 1
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Tuesday, Jun 17 - Sep 2
Sunday, Jun 22 - Sep 21 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Jun 23 - Sep 15
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Final Fives
Sunday, May 11 - Jun 8
Tuesday, May 27 - Jun 17
Monday, Jun 30 - Jul 21

AMC 12 Problem Series
Tuesday, May 27 - Aug 12
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Wednesday, Aug 6 - Oct 22

AMC 12 Final Fives
Sunday, May 18 - Jun 15

F=ma Problem Series
Wednesday, Jun 11 - Aug 27

WOOT Programs
Visit the pages linked for full schedule details for each of these programs!


MathWOOT Level 1
MathWOOT Level 2
ChemWOOT
CodeWOOT
PhysicsWOOT

Programming

Introduction to Programming with Python
Monday, Mar 24 - Jun 16
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
Sunday, Mar 30 - Jun 22
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Tuesday, Mar 25 - Sep 2
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
Sat & Sun, Apr 26 - Apr 27 (4:00 - 7:00 pm ET/1:00 - 4:00pm PT)
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
Mar 2, 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
D1010 : How it is possible ?
Dattier   13
N 17 minutes ago by Dattier
Source: les dattes à Dattier
Is it true that$$\forall n \in \mathbb N^*, (24^n \times B \mod A) \mod 2 = 0 $$?

A=1728400904217815186787639216753921417860004366580219212750904
024377969478249664644267971025952530803647043121025959018172048
336953969062151534282052863307398281681465366665810775710867856
720572225880311472925624694183944650261079955759251769111321319
421445397848518597584590900951222557860592579005088853698315463
815905425095325508106272375728975

B=2275643401548081847207782760491442295266487354750527085289354
965376765188468052271190172787064418854789322484305145310707614
546573398182642923893780527037224143380886260467760991228567577
953725945090125797351518670892779468968705801340068681556238850
340398780828104506916965606659768601942798676554332768254089685
307970609932846902
13 replies
Dattier
Mar 10, 2025
Dattier
17 minutes ago
Interesting inequality
sqing   1
N 17 minutes ago by sqing
Source: Own
Let $ a,b\geq 2  . $ Prove that
$$ (a^2-1)(b^2-1) (1-ab)+\frac{27}{8}a^2b^2\leq 27$$$$ (a^2-1)(b^2-1)(1-a^2b^2 )+\frac{81}{4}a^2b^2     \leq 189$$$$ (a^2-1)(b^2-1)(1-a^2b^2 )+ 162  ab  \leq 513$$$$  (a^2-1)(b^2-1) (1-a^2b^2 )+21 a^2b^2\leq \frac{3219}{16}$$$$ (a^2-1)(b^2-1) (1-ab)+\frac{27}{8}a^2b^2\leq\frac{415+61\sqrt{61}}{18}$$
1 reply
1 viewing
sqing
an hour ago
sqing
17 minutes ago
Minimal Grouping in a Complete Graph
swynca   1
N 27 minutes ago by swynca
Source: 2025 Turkey TST P1
In a complete graph with $2025$ vertices, each edge has one of the colors $r_1$, $r_2$, or $r_3$. For each $i = 1,2,3$, if the $2025$ vertices can be divided into $a_i$ groups such that any two vertices connected by an edge of color $r_i$ are in different groups, find the minimum possible value of $a_1 + a_2 + a_3$.
1 reply
1 viewing
swynca
3 hours ago
swynca
27 minutes ago
Nice FE as the First Day Finale
swynca   1
N 35 minutes ago by swynca
Source: 2025 Turkey TST P3
Find all $f: \mathbb{R} \rightarrow \mathbb{R}$ such that, for all $x,y \in \mathbb{R}-\{0\}$,
$$ f(x) \neq 0 \text{ and } \frac{f(x)}{f(y)} + \frac{f(y)}{f(x)} - f \left( \frac{x}{y}-\frac{y}{x} \right) =2 $$
1 reply
swynca
3 hours ago
swynca
35 minutes ago
Cn/lnn bound for S
EthanWYX2009   0
38 minutes ago
Source: 2025 March 谜之竞赛-2
Prove that there exists an constant $C,$ such that for all integer $n\ge 2$ and a subset $S$ of $[n],$ satisfy $a\mid\tbinom ab$ for all $a,b\in S,$ $a>b,$ then $|S|\le \frac{Cn}{\ln n}.$

Created by Yuxing Ye
0 replies
+1 w
EthanWYX2009
38 minutes ago
0 replies
Natural function and cubelike expression
sarjinius   2
N 43 minutes ago by Kaimiaku
Source: Philippine Mathematical Olympiad 2025 P8
Let $\mathbb{N}$ be the set of positive integers. Find all functions $f : \mathbb{N} \to \mathbb{N}$ such that for all $m, n \in \mathbb{N}$, \[m^2f(m) + n^2f(n) + 3mn(m + n)\]is a perfect cube.
2 replies
sarjinius
Mar 9, 2025
Kaimiaku
43 minutes ago
hard problem
Noname23   3
N an hour ago by Noname23
problem
3 replies
Noname23
Sunday at 4:57 PM
Noname23
an hour ago
Roots, bounding and other delusions
anantmudgal09   28
N an hour ago by kes0716
Source: INMO 2021 Problem 6
Let $\mathbb{R}[x]$ be the set of all polynomials with real coefficients. Find all functions $f: \mathbb{R}[x] \rightarrow \mathbb{R}[x]$ satisfying the following conditions:

[list]
[*] $f$ maps the zero polynomial to itself,
[*] for any non-zero polynomial $P \in \mathbb{R}[x]$, $\text{deg} \, f(P) \le 1+ \text{deg} \, P$, and
[*] for any two polynomials $P, Q \in \mathbb{R}[x]$, the polynomials $P-f(Q)$ and $Q-f(P)$ have the same set of real roots.
[/list]

Proposed by Anant Mudgal, Sutanay Bhattacharya, Pulkit Sinha
28 replies
anantmudgal09
Mar 7, 2021
kes0716
an hour ago
square geometry bisect $\angle ESB$
GorgonMathDota   11
N an hour ago by miiirz30
Source: BMO SL 2019, G1
Let $ABCD$ be a square of center $O$ and let $M$ be the symmetric of the point $B$ with respect to point $A$. Let $E$ be the intersection of $CM$ and $BD$, and let $S$ be the intersection of $MO$ and $AE$. Show that $SO$ is the angle bisector of $\angle ESB$.
11 replies
GorgonMathDota
Nov 8, 2020
miiirz30
an hour ago
Inspired by my own results
sqing   5
N an hour ago by sqing
Source: Own
Let $ a ,  b  $ be reals such that $ a+b+ab=1. $ Show that$$ 1-\frac{1 }{\sqrt2}\le \frac{1}{a^2+1}+\frac{1}{b^2+1}\le 1+\frac{1 }{\sqrt2} $$Let $ a ,  b\geq 0 $ and $ a+b+ab=1. $ Show that$$ \frac{3}{2}\le \frac{1}{a^2+1}+\frac{1}{b^2+1}\le 1+\frac{1 }{\sqrt2} $$
5 replies
sqing
Yesterday at 8:32 AM
sqing
an hour ago
Polygon formed by the edges of an infinite chessboard
AlperenINAN   1
N an hour ago by AlperenINAN
Source: Turkey TST 2025 P5
Let $P$ be a polygon formed by the edges of an infinite chessboard, which does not intersect itself. Let the numbers $a_1,a_2,a_3$ represent the number of unit squares that have exactly $1,2\text{ or } 3$ edges on the boundary of $P$ respectively. Find the largest real number $k$ such that the inequality $a_1+a_2>ka_3$ holds for each polygon constructed with these conditions.
1 reply
AlperenINAN
3 hours ago
AlperenINAN
an hour ago
Interesting inequality
sqing   5
N 2 hours ago by sqing
Source: Own
Let $ a,b\geq 2  . $ Prove that
$$(a^2-1)(b^2-1) -6ab\geq-15$$$$(a^2-1)(b^2-1)  -7ab\geq  -\frac{58}{3}$$$$(a^3-1)(b^3-1)  -\frac{21}{4}a^2b^2\geq -35$$$$(a^3-1)(b^3-1)  -6a^2b^2\geq-\frac{2391}{49}$$
5 replies
1 viewing
sqing
5 hours ago
sqing
2 hours ago
Problem 2830
sqing   1
N 2 hours ago by invisibleman
Source: SXTB (2)2025
Let $ a,b>0 $ and $ \frac{1}{a^2+1}+ \frac{1}{b^2+1}=t $ $(1<t<2). $ Find the value range of $ a+b. $
h
1 reply
sqing
Yesterday at 8:15 AM
invisibleman
2 hours ago
Polynomials and powers
rmtf1111   26
N 2 hours ago by ihategeo_1969
Source: RMM 2018 Day 1 Problem 2
Determine whether there exist non-constant polynomials $P(x)$ and $Q(x)$ with real coefficients satisfying
$$P(x)^{10}+P(x)^9 = Q(x)^{21}+Q(x)^{20}.$$
26 replies
rmtf1111
Feb 24, 2018
ihategeo_1969
2 hours ago
Recursive Grid Construction
john0512   14
N Feb 26, 2025 by Orzify
Source: 2023 USA TSTST Problem 3
Find all positive integers $n$ for which it is possible to color some cells of an infinite grid of unit squares red, such that each rectangle consisting of exactly $n$ cells (and whose edges lie along the lines of the grid) contains an odd number of red cells.

Proposed by Merlijn Staps
14 replies
john0512
Jun 26, 2023
Orzify
Feb 26, 2025
Recursive Grid Construction
G H J
G H BBookmark kLocked kLocked NReply
Source: 2023 USA TSTST Problem 3
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
john0512
4170 posts
#1 • 3 Y
Y by Lcz, ImSh95, megarnie
Find all positive integers $n$ for which it is possible to color some cells of an infinite grid of unit squares red, such that each rectangle consisting of exactly $n$ cells (and whose edges lie along the lines of the grid) contains an odd number of red cells.

Proposed by Merlijn Staps
This post has been edited 1 time. Last edited by john0512, Jun 26, 2023, 4:00 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6858 posts
#2 • 6 Y
Y by surpidism., Mop2018, zewsx00, ImSh95, Amir Hossein, Om245
We claim that this is possible for all positive integers $n$. Call a positive integer for which such a coloring is possible good. To show that all positive integers $n$ are good we prove the following: (i) If $n$ is good and $p$ is an odd prime, then $pn$ is good; (ii) For every $k \ge 0$, the number $n=2^k$ is good. Together, (i) and (ii) imply that all positive integers are good.
Proof of (i) We simply observe that if every rectangle consisting of $n$ cells contains an odd number of red cells, then so must every rectangle consisting of $pn$ cells. Indeed, because $p$ is prime, a rectangle consisting of $pn$ cells must have a dimension (length or width) divisible by $p$ and can thus be subdivided into $p$ rectangles consisting of $n$ cells.
Thus every coloring that works for $n$ automatically also works for $pn$.
Proof of (ii) Observe that rectangles with $n=2^k$ cells have $k+1$ possible shapes: $2^m\times 2^{k-m}$ for $0\leq m \leq k$.

Claim: For each of these $k+1$ shapes, there exists a coloring with two properties:
  • Every rectangle with $n$ cells and shape $2^m\times 2^{k-m}$ contains an odd number of red cells.
  • Every rectangle with $n$ cells and a different shape contains an even number of red cells.
Proof. This can be achieved as follows: assuming the cells are labeled with $(x, y)\in \mathbb{Z}^2$, color a cell red if $x\equiv 0\pmod{2^m}$ and $y\equiv 0\pmod{2^{k-m}}$. For example, a $4 \times 2$ rectangle gets the following coloring: [asy]
unitsize(12); int a = 4, b = 2; int n = a*b; real extra = 0.25; transform t = scale(1, -1); for (int i = 0; i <= n; i += a) for (int j = 0; j <= n; j += b) fill(t * shift(i, j) * unitsquare, red); clip(t*box((-extra, -extra), (n+extra, n+extra))); for (int i = 0; i <= n; ++i) { draw(t*((i, -extra)--(i, n+extra))); draw(t*((-extra, i)--(n+extra, i))); }  [/asy] A $2^m\times 2^{k-m}$ rectangle contains every possible pair $(x\mod{2^m}, y\mod {2^{k-m}})$ exactly once, so such a rectangle will contain one red cell (an odd number).
On the other hand, consider a $2^{\ell}\times 2^{k-\ell}$ rectangle with $\ell > m$. The set of cells this covers is $(x, y)$ where $x$ covers a range of size $2^{\ell}$ and $y$ covers a range of size $2^{k-\ell}$. The number of red cells is the count of $x$ with $x\equiv 0\mod{2^m}$ multiplied by the count of $y$ with $y\equiv 0\mod{2^{k-m}}$. The former number is exactly $2^{\ell-k}$ because $2^k$ divides $2^{\ell}$ (while the latter is $0$ or $1$) so the number of red cells is even. The $\ell < m$ case is similar. $\blacksquare$
Finally, given these $k+1$ colorings, we can add them up modulo $2$, i.e.\ a cell will be colored red if it is red in an odd number of these $k+1$ colorings. We illustrate $n=4$ as an example; the coloring is $4$-periodic in both axes so we only show one $4\times 4$ cell.
[asy]
unitsize(0.5cm);
int pow2(int k) { int n = 1; for (int i = 0; i < k; ++i) { n *= 2; } return n; }
int k = 2; int n = pow2(k); int XSHIFT = 0;
void draw_grid() { for (int i = 0; i <= n; ++i) { draw((XSHIFT+i, 0)--(XSHIFT+i, n)); draw((XSHIFT+0, i)--(XSHIFT+n, i)); } }
void fill_cell(int i, int j) { fill((XSHIFT+i, j)--(XSHIFT+i+1, j)--(XSHIFT+i+1, j+1)--(XSHIFT+i, j+1)--cycle, red); }
void draw_single(int m) { for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { if (i%pow2(m) == 0 && j%pow2(k-m) == 0) { fill_cell(i, j); } } } draw_grid(); XSHIFT += n; }
void draw_sum() { for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { int cnt = 0; for (int m = 0; m <= k; ++m) { if (i%pow2(m) == 0 && j%pow2(k-m) == 0) { ++cnt; } } if (cnt%2 == 1) { fill_cell(i, j); } } } draw_grid(); XSHIFT += n; }
void draw_symbol(string s) { label(scale(2)*s, (XSHIFT+1, n/2), blue); XSHIFT += 2; }
for (int i = 0; i < k; ++i) { draw_single(i); draw_symbol("$\oplus$"); } draw_single(k); draw_symbol("$=$"); draw_sum();  [/asy]
This solves the problem.

Remark: The final coloring can be described as follows: color $(x, y)$ red if \[\max(0, \min(\nu_2(x), k)+\min(\nu_2(y), k)-k+1)\]is odd.

Remark: [Luke Robitaille] Alternatively for (i), if $n = 2^e k$ for odd $k$ then one may dissect an $a \times b$ rectangle with area $n$ into $k$ rectangles of area $2^e$, each $2^{\nu_2(a)} \times 2^{\nu_2(b)}$. This gives a way to deduce the problem from (ii) without having to consider odd prime numbers.
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
#3 • 1 Y
Y by ImSh95
I know this sounds very absurd, but... Laurent series, anyone? :maybe:

Edit: By Laurent series I mean gen func, one of my specialities for which I am infamous (not that I am able to use it well).
This post has been edited 1 time. Last edited by Leo.Euler, Jun 26, 2023, 7:54 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
TheUltimate123
1739 posts
#4 • 1 Y
Y by ImSh95
The answer is all \(n\).

Claim: The problem holds for \(n\) a power of two.

Proof. Base cases of \(n=1\) and \(n=2\) are easily verified. We prove that the problem for \(n=2^{k-2}\) implies the problem for \(n=2^k\).

The construction for \(n=2^k\) is as follows:
  1. Partition the plane into \(2\times2\) squares, and color the top-left corner of each \(2\times2\) square according to the construction for \(n=2^{k-2}\). Coloring everything else white.
  2. Then, toggle the color of every square \((x,y)\) so that either \(2^k\mid x\) or \(2^k\mid y\), but not both. (We can think of this as toggling all the \(0\bmod2^k\) rows and \(0\bmod2^k\) columns, thereby leaving the intersections of these rows and columns unchanged.)

Of course the valid coloring for \(n=2^{k-2}\) is periodic modulo \(2^{k-2}\) in each direction, so our construction after (1) is periodic modulo \(2^{k-1}\) in each direction. After (1), Each \(1\times2^k\) or \(2^k\times1\) rectangle passes through two periodic copies of the same pattern, but step (2) toggles exactly one square (or all but one square), so the number of red squares is odd.

On the other hand, for each \(2a\times2b\) rectangle where \(ab=2^{k-2}\), the cells of the \(2a\times2b\) rectangle with both even coordinates are the only cells that may be red after (1), and they form a \(a\times b\) rectangle in the corresponding construction for \(n=2^{k-2}\), so it contains an odd number of red squares. Since both dimensions of the \(2a\times2b\) rectangle are even, (2) only adjusts the color of squares an even number of times, so there are still an odd number of squares. \(\blacksquare\)

Finally, if \(n=2^k\cdot t\) for some odd \(t\), the construction for \(n=2^k\) also works for \(n=2^k\cdot t\). After all, for each \(a\times b\) rectangle, we may write \[a=2^e\cdot a'\quad\text{and}\quad 2^f\cdot b'\]for odd \(a'\) and \(b'\), with \(2^e\cdot 2^f=2^k\). Therefore the \(a\times b\) rectangle may be partitioned into \(a'b'\) rectangles of dimension \(2^e\times2^f\). We have an odd number of rectangles, each with an odd number of red squares, so the total number of red squares is odd.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
CANBANKAN
1301 posts
#5 • 2 Y
Y by David-Vieta, ImSh95
If IMO 1 geo were this easy. The answer is all $n$. We first provide constructions for powers of 2.

Let $n=2^k$. Let $f\colon (\mathbb{Z}/2^k\mathbb{Z})^2 \to \mathbb{F}_2$ such that $f(x,y)$ is 1 iff it is red. A direct construction seems hard, but after some experimentation, we find that it is not too hard to make sure the sum of $f$ in any $2^a \times 2^{k-a}$ rectangle is 1 for some fixed $k$. Motivated by this, we go into our construction:

For each $j=0,\cdots,k$, we construct such $f$ such that the sum of any $2^a\times 2^{k-a}$ rectangle is $0$ if $a\ne j$ and is $1$ otherwise. Let our construction be $f_j(x,y) = 1_{2^a\mid x} 1_{2^{k-a}\mid y} $. Note in any $2^j\times 2^{k-j}$ rectangle, the number of $(x,y)$ such that $2^j\mid x, 2^{k-j} \mid y$. When $a>j$ the number of $1$'s in a $2^a \times 2^{k-a}$ rectangle such that $2^j\mid x$ is even, so the number of 1's in this rectangle is even is (number of $x$ such that $2^j\mid x$ in range) $\times$ (number of $y$ such that $2^{k-j}\mid y$ in range). A similar argument applies for $a<j$.

Therefore the construction $\sum\limits_{l=0}^k f_l$ works solves the problem for $n=2^k$.

Now, if $n=2^kq$ where $q$ is odd, then the same construction for $2^k$ works; any $2^jq_1 \times 2^{k-j}q_2$ can be partitioned into $q_1q_2$ rectangles of size $2^j\times 2^{k-j}$, and each of these have an odd number of 1's.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
NoctNight
108 posts
#6 • 1 Y
Y by ImSh95
Solved with an IMO team member (mostly him).

The answer is all positive integer $n$. Replace "red" and "not red" with $1$ and $0$ respectively.

Claim: It is possible for all positive integers $2^k$ for $k=0,1,2,\ldots$.
The motivation: we take $k+1$ labellings $\mathcal L_0,\mathcal L_2,\ldots, \mathcal L_k$ where the square $(x,y)$ has a $1$ in $\mathcal L_t$ if and only if $2^t\mid x$ and $2^{k-t}\mid y$. Then, in the final labelling:
$$L(x,y)=
\begin{cases}
1 & \text{ if }(x,y)\text{ is }1\text{ in an odd number of }\mathcal L_t\text{'s}\\
0 & \text{ if }(x,y)\text{ is }1\text{ in an even number of }\mathcal L_t\text{'s}
\end{cases}
$$To prove that any rectangle of the form $2^a\times 2^{k-a}$ for $a=0,1,\ldots, k$ ($2^a$ in width, $2^{k-a}$ in height) has an odd number of $1$'s, we will show that $2^a\times 2^{k-a}$ has an odd number of $1$'s in $\mathcal L_t$ if and only if $t=a$.

If $t=a$, the result is evident - there is exactly one $1$ of $\mathcal L_a$ in any $2^a\times 2^{k-a}$ rectangle.

If $t<a$, then any row of the $2^a\times 2^{k-a}$ rectangle containing a $1$ contains $\frac{2^a}{2^t}=2^{a-t}$ $1$'s, which is an even number. Thus, there is an even number of $1$'s in the rectangle. The $t>a$ case can be handled similarly (columns).

In the final labelling $L$, for any $2^a\times 2^{k-a}$ rectangle let $S_i$ be the sum of entries of the rectangle under labelling $\mathcal L_i$ for $i=0,1,\ldots, k$. Thus, the number of $1$'s in the rectangle under $L$ has same parity as:
$$S_0+S_1+\cdots + S_k = (S_0+S_1+\cdots+ S_{a-1}+S_{a+1}+\cdots +S_k)+S_a$$which is odd, as needed. Thus, it is possible for any $n=2^k$ for integer $k\geq 0$. $\square$

To finish, let $n=2^kr$ where $r$ is an odd integer and use the labelling for $2^k$. For rectangle with dimensions $a\times b$ ($ab=n$) take $c,d$ such that $2^c\mid a, 2^d\mid b$ and $c+d=a$. Then partition the $a\times b$ rectangle into $r$ rectangles of size $c\times d$: each of these contain an odd number of $1$'s, so the total number of $1$'s in the $a\times b$ rectangle is congruent to $r$ which is odd.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
zewsx00
19 posts
#7 • 1 Y
Y by ImSh95
The same as CANBANKAN's,quite an ez problem for USA TSTST P3 :P
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
yofro
3145 posts
#8 • 1 Y
Y by ImSh95
Solved with TheBeast5520 and RubiksCube3.1415.

The answer is all $n$. First we show that $n=2^k$ is possible for $k\ge 0$, then we show that the construction for $2^k$ works for any $n$ with $\nu_2(n)=k$.

Construction
Proof of validity
Proof for all n
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
dbj2015
18 posts
#9 • 3 Y
Y by ImSh95, tenebrine, centslordm
Solved this as a graduated 2nd grader and now rising 3rd grader while mocking the 2023 USA TSTST Day 1.
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
GrantStar
812 posts
#10 • 1 Y
Y by ImSh95
interesting.

I claim it is possible for all $n$. Observe the following:
  • Notice that each row and column repeats every $n$ squares. We thus consider only a $n \times n$ grid and let rectangles wrap around.
  • Proving it works for an $n\times n$ grid with wrapping rectangles with show it works on an infinite grid.
Claim: It is possible for $n=2^k$ for $k\geq 0$.
Proof. Proceed with (2-step) induction on $k$. The base cases are $k=0$ where a full red grid works and $k=1$ alternating red and blue work. Assume it is true up to $k=j,$ we show its true for $k=j+2.$

First, we present a construction. We show true for an $2^{j+2}\times 2^{j+2}$ square and then repeat that square for the rest of the grid. Also, WLOG ket the bottom left corner or the square be $(1,1)$ and each cell in the grid is one unit. Also, let $2^j$ be $m$ so our goal is to show true for a $4m\times 4m$ grid.

Construction. Color the cell $(1,1)$ red. Also, color the squares on the union of the lines from $(2m,2)$ to $(2m,4m)$ and $(2,2m)$ to $(4m,2m)$ and call these the center cross and $(2m,2m)$ the center. Then, consider where the red sqaures the construction for $m$ and remove the bottom row and left most column. Then, dilate it out from its new center by a scale of $2$ (so a point $x$ away from the center is sent to $2x$ units away), color everything else blue, and place this new configuration in the grid $4$ times, centered at $(m+1,m+1),(3m,m+1),(m+1,3m),(3m,3m).$ I claim this is a valid arrangement.

Proof of construction. Notice that by construction, the red square at $(1,1)$ isnt in a rectangle with area $4m$ with any other red square so it works. Also, all other $1\times m$ or $m\times 1$ work by symmetry, Now, consider a rectangle not passing through this point and with both dimensions at least $2$. We have three cases:

Case 1. The rectangle does not pass through the center cross. This case is easy, since if we dilate all red points centered at $(m+1,m+1)$ with ratio $1/2,$ we are simply left with the $m$ case which by hypothesis works.

Case 2. The rectangle passes through the center cross but not the center. If it intersects the vertical one, lay $4m-1$ disjoint copies of it to its left (wrapping around) to make a big rectangle that has length $4m$. Since the height of this ractangle divides $4m$ and is not one, it must be even so the amount if rectangles in it is even by considering $m\times 1$ rectangles. But none of the other $4m-1$ laid down pass through the center cross meaning they all have an odd amount of red tiles. But there's an odd amount if these so the total in the $4m-1$ other rectangles must be odd and thus the original must have odd total. Horizontal is the same but lay them above.

Case 3. The rectangle passes through the center. This case is the same as above in process: lay rectangles to the left and wrap around all of which have an odd amount of red tiles.

These cases are exhaustive and disjoint, so thus such a coloring is possible for $n=4m$. This completes the indiction and the claim is thus proven.
Now we are left with the easy part! To show its true for all $m$, repeat the construction for a $n=2^{v_2(m)}.$ This works since each rectangle with area $m$ can be split up into an odd amount of rectangles with area $2^{v_2(m)}$. We are thus done.

Remark. Here are some more constructions :) you can see how they were made using the case two powers of two before. Shaded squares are red.
n=4
n=8
n=16
n=32
This post has been edited 1 time. Last edited by GrantStar, Jun 29, 2023, 7:34 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math_comb01
659 posts
#11 • 1 Y
Y by bookstuffthanks
Very Nice problem! Sketch (since write up is long) The answer is all $n$.
Firstly notice that it suffices to prove a construction for $n=2^k$, to do this we proceed by 2 step induction. Say the bottom left square $(1,1)$, and color that red, then draw a center cross in the square not containing cells of "hook" of the bottom left square. The idea is now to dilate our construction of $2^{k-2}$ and place that in. Now to prove this that this works, we take a few cases, first being that the rectangle doesn't pass through the center cross, it is easy to see that this works. Second, it passes through the center cross, but not through the center of cross, and third being passes through center of cross, each case being easy to verify. Hence, we're done.
Remark: Another (nice)question with construction part being the pith of the problem!
EDIT: 300th HSO post!
This post has been edited 1 time. Last edited by math_comb01, Mar 8, 2024, 4:06 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaoAOPS
1486 posts
#12
Y by
Solved with Narwhal234.

We claim all $n$ work. We first show that $n = 2^k$ works.
Call an $(a, b)$ lattice a lattice where the squares $(ax, by)$ are colored red.

Claim: For a $(2^a, 2^b)$ lattice, the number of squares in a rectangle with area $n \coloneq 2^{a+b}$ is odd iff the rectangle is $2^a \times 2^b$ (where $2^a$ is the width).
Proof. If the rectangle has such dimensions it contains exactly one such square.
Else, suppose the rectangle has dimensions $2^{a'} \times 2^{b'}$ for $(a, b) \ne (a', b')$. Then either $a' > a$ or $b' > b$, WLOG say $a' > a$.
Then this rectangle consists of two identical side by side $2^{a'-1} \times 2^{b'}$ rectangles as $a'-1 \ge a$, so it has an even number of squares. $\blacksquare$
Now, taking the xor over all $(2^a, 2^{k-a})$ lattices for $0 \le a \le k$ works.
Then for any general $n = 2^kb$ where $b$ is odd, just take the construction for $2^a$. Any $2^a p \times 2^{k-a} q$ rectangle for $pq = b$ is $b$ copies of a $2^a \times 2^{k-a}$ rectangle which has an odd number of cells, so this rectangle also has an odd number of cells.

Remark: This remains the same when generalizing to coloring $\mathbb{Z}^n$.
This post has been edited 3 times. Last edited by YaoAOPS, Oct 5, 2024, 6:50 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Narwhal234
29 posts
#13
Y by
^ YaoAops did like 90% of the work lmaoooo
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ritwin
150 posts
#14
Y by
All $n$ work.

Claim: Suppose $a \mid b$. Then any grid rectangle of area $b$ can be partitioned into grid rectangles of area $a$.
Proof. Suppose the rectangle has dimensions $x \times y$. Then there must exist $u \mid x$ and $v \mid y$ so that $a = uv$. (Pick $\nu_p(u)$ and $\nu_p(v)$ for each prime $p \mid b$.) $\square$

As such, it is clear we only need to prove the $n = 2^m$ case. Any rectangle of area $(2k+1) 2^m$ can be partitioned into $2k+1$ rectangles of area $2^m$, so the same coloring for $2^m$ works for $(2k+1)2^m$.
$\color{blue}\boldsymbol{n=2^m}$ case. For $m = 0$ color everything red, and for $m = 1$ use a checkerboard. For $m = 2$, color $[2^m]^2$ as follows:
  • Color $(x, y)$ red for each $x, y \in [2^m-1]$ where $2^{m-1} \mid xy$.
  • Color $(2^m, 2^m)$ red.
All other cells are uncolored.
For example, this produces the following $16 \times 16$ coloring:
[asy]
unitsize(.3cm); int N = 16;
for (int x = 0; x < N; ++x) { for (int y = 0; y < N; ++y) { pen fl = white; if (x*y%(N#2) == 0) fl = red; if (x*y == 0) fl = white; if (x+y == 0) fl = red; fill(shift(N-x-1, y) * unitsquare, fl); } }
for (int n = 1; n <= N; ++n) { label((n-.5, N+.5), scale(.5) * ("$"+(string)n+"$")); label((-.5, N-n+.5), scale(.5) * ("$"+(string)n+"$")); } for (int x = 0; x <= N; ++x) draw((x,0) -- (x,N)); for (int y = 0; y <= N; ++y) draw((0,y) -- (N,y)); draw(scale(N, N) * unitsquare, black+1.3);
[/asy]
Then, tile the infinite grid with this square. We'll show this works.

Consider any $2^a \times 2^b$ subrectangle $R$, where $a+b = m$. Group the cells $(r, c)$ in $R$ into classes based on $(\nu_2(r), \nu_2(c))$. Each class consists of all red or all uncolored cells. Note that most of these classes have even cardinality, so they do not affect the parity of the red cell count. We discard those classes.

Let $r_\text{max}$ and $c_\text{max}$ be the row and column indices in $R$ that maximize $\nu_2(r_\text{max})$ and $\nu_2(c_\text{max})$, and call those maximal values $a' \geq a$ and $b' \geq b$. We know the second-maximum $\nu_2$ values must be $a-1$ and $b-1$. Looking by $\nu_2$, the four (potential) classes of odd size are
  1. $(a-1, b-1)$,
  2. $(a-1, b')$,
  3. $(a', b-1)$,
  4. $(a', b')$,
and each of these classes have exactly one cell. We have four cases:
  • If $a' = b' = \infty$ (i.e. $(0, 0)$ is in $R$) then by construction only (iv) has a red cell.
  • If $a' = \infty \neq b'$ then only (ii) has a red cell.
  • If $a' \neq \infty = b'$ then only (iii) has a red cell.
  • Otherwise, only (i) has an uncolored cell since $a' \geq a$ and $b' \geq b$.
In each case there are $1$ or $3$ red cells, which is odd. Thus, this construction works. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Orzify
11 posts
#15
Y by
sketch
Z K Y
N Quick Reply
G
H
=
a