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
D1010 : How it is possible ?
Dattier   3
N 5 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=172840090421781518678763921675392141786000436658021921275090402437796947824966464426797102
59525308036470431210259590181720483369539690621515342820528633073982816814653666658107757108
67856720572225880311472925624694183944650261079955759251769111321319421445397848518597584590
900951222557860592579005088853698315463815905425095325508106272375728975

B=227564340154808184720778276049144229526648735475052708528935496537676518846805227119017278
70644188547893224843051453107076145465733981826429238937805270372241433808862604677609912285
67577953725945090125797351518670892779468968705801340068681556238850340398780828104506916965
606659768601942798676554332768254089685307970609932846902
3 replies
Dattier
Mar 10, 2025
Dattier
5 minutes ago
Number Theory
karasuno   1
N 7 minutes ago by Tkn
Solve the equation $$n!+10^{2014}=m^{4}$$in natural numbers m and n.
1 reply
karasuno
4 hours ago
Tkn
7 minutes ago
Flo0r functi0n
m4thbl3nd3r   5
N 25 minutes ago by pco
Find all positive integers such that $$n=\lfloor \sqrt{n}\rfloor^2+\lfloor \sqrt{n}\rfloor$$
5 replies
m4thbl3nd3r
2 hours ago
pco
25 minutes ago
Hard T^T
Noname23   1
N 28 minutes ago by RagvaloD
<problem>
1 reply
+1 w
Noname23
an hour ago
RagvaloD
28 minutes ago
Inequality
jokehim   0
4 hours ago
Problem. Given non-negative real numbers $a,b,c$ satisfying $a+b+c=3.$ Prove that $$\sqrt{a^2+2abc+b^2}+\sqrt{b^2+2abc+c^2}+\sqrt{c^2+2abc+a^2}\le 6.$$Proposed by Phan Ngoc Chau
0 replies
jokehim
4 hours ago
0 replies
2017 BCSMC Round 2 #3 yellow pig walks on a number line
parmenides51   3
N Today at 4:20 AM by MathPerson12321
A yellow pig walks on a number line starting at $17$. Each step the pig has probability $\frac{8}{17}$ of moving $1$ unit in the positive direction and probability $\frac{9}{17}$ of moving $1$ unit in the negative direction. Find the expected number of steps until the yellow pig visits $0$.
3 replies
parmenides51
Jan 24, 2024
MathPerson12321
Today at 4:20 AM
number theory
IOQMaspirant   6
N Today at 3:19 AM by Yiyj1
Prove 6|(a + b + c) if and only if 6|(a^3 + b^3 + c^3)
6 replies
IOQMaspirant
Mar 11, 2025
Yiyj1
Today at 3:19 AM
Mathematica
Wiselady   9
N Today at 3:10 AM by whwlqkd
Let ABC be any triangle. Let side BC pass through point C to point D such that CD=AC. Let P be the second intersection point of the circumscribed circle ACD with the circle with BC as the diameter. Let BP and AC meet at point E and let CP and AB meet at point F. Prove that D, E, F lie on the same straight line.
9 replies
Wiselady
Mar 12, 2025
whwlqkd
Today at 3:10 AM
Collinear proof
Wiselady   1
N Today at 3:01 AM by whwlqkd
Let ABC be any triangle. Let side BC pass through point C to point D such that CD=AC. Let P be the second intersection point of the circumscribed circle ACD with the circle with BC as the diameter. Let BP and AC meet at point E and let CP and AB meet at point F. Prove that D, E, F lie on the same straight line.
IMAGE
1 reply
Wiselady
Today at 1:33 AM
whwlqkd
Today at 3:01 AM
How to get better at AMC 10
Dream9   2
N Today at 2:01 AM by hashbrown2009
I'm nearly in high school now but only average like 75 on AMC 10 sadly. I want to get better so I'm doing like the first 11 questions of previous AMC 10's almost every day because I also did previous years for AMC 8. Is there any specific way to get better scores and understand more difficult problems past AMC 8? I have almost no trouble with AMC 8 problem given enough time (like 23-24 right with enough time).
2 replies
Dream9
Today at 1:17 AM
hashbrown2009
Today at 2:01 AM
Intermediate Functions
sadas123   3
N Today at 1:30 AM by sadas123
For the set ${a,b,c,d}$, the sum of the products of the elements taken 2 at a time is $ab+ac+ad+bc+bd+cd$; and the sum of the products of the elements taken 3 at a time is $abc+and+acd+bcd$. Let $f(n)$ be the sum of the products of the first 2000 positive integers, taken n at a time. For example, $f(1)$= the sum of the first 2000 positive integers, and $f(2)$ = the sum of the products of the 2000 positive integers, taken two at a time, etc. What is the value of $f(1)$+$f(2)$+$f(3)$+..........+$f(1999)$+$f(2000)$?
3 replies
sadas123
Today at 12:43 AM
sadas123
Today at 1:30 AM
Stanford Math Tournament PoTW 3/14
stanford-math-tournament   0
Today at 12:34 AM
Stanford Math Tournament is happening in less than a month—register for our online competition here!

Here's this week's SMT Problem of the Week:

Problem

Feel free to reach out to us at stanford.math.tournament@gmail.com with any questions, or ask them in this thread.

Best,

The SMT Team
0 replies
stanford-math-tournament
Today at 12:34 AM
0 replies
Inequality containing arithemetic elements
nhathhuyyp5c   2
N Today at 12:20 AM by kred9
Let $x,y,z$ be positive integers such that $\sqrt{x}+\sqrt{y}+\sqrt{z}=\sqrt{2023}$. Find $\min,\max$ of $\frac{x+y}{z}+\frac{y+z}{x}+\frac{z+x}{y}$
2 replies
nhathhuyyp5c
Yesterday at 3:54 PM
kred9
Today at 12:20 AM
2017 BCSMC Round 2 #10 2^{2^3 x 5^{22}} mod 81
parmenides51   1
N Yesterday at 10:58 PM by CubeAlgo15
Find $2^{2^3 \cdot 5^{22}}$ (mod $81$).
1 reply
parmenides51
Jan 24, 2024
CubeAlgo15
Yesterday at 10:58 PM
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
6857 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
811 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
1482 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
28 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
149 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