Stay ahead of learning milestones! Enroll in a class over the summer!

G
Topic
First Poster
Last Poster
k a April Highlights and 2025 AoPS Online Class Information
jlacosta   0
Apr 2, 2025
Spring is in full swing and summer is right around the corner, what are your plans? At AoPS Online our schedule has new classes starting now through July, so be sure to keep your skills sharp and be prepared for the Fall school year! Check out the schedule of upcoming classes below.

WOOT early bird pricing is in effect, don’t miss out! If you took MathWOOT Level 2 last year, no worries, it is all new problems this year! Our Worldwide Online Olympiad Training program is for high school level competitors. AoPS designed these courses to help our top students get the deep focus they need to succeed in their specific competition goals. Check out the details at this link for all our WOOT programs in math, computer science, chemistry, and physics.

Looking for summer camps in math and language arts? Be sure to check out the video-based summer camps offered at the Virtual Campus that are 2- to 4-weeks in duration. There are middle and high school competition math camps as well as Math Beasts camps that review key topics coupled with fun explorations covering areas such as graph theory (Math Beasts Camp 6), cryptography (Math Beasts Camp 7-8), and topology (Math Beasts Camp 8-9)!

Be sure to mark your calendars for the following events:
[list][*]April 3rd (Webinar), 4pm PT/7:00pm ET, Learning with AoPS: Perspectives from a Parent, Math Camp Instructor, and University Professor
[*]April 8th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS State Discussion
April 9th (Webinar), 4:00pm PT/7:00pm ET, Learn about Video-based Summer Camps at the Virtual Campus
[*]April 10th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MathILy and MathILy-Er Math Jam: Multibackwards Numbers
[*]April 22nd (Webinar), 4:00pm PT/7:00pm ET, Competitive Programming at AoPS (USACO).[/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, 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
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
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
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
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
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
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
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
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
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
Tuesday, Jun 10 - Aug 26

Calculus
Tuesday, May 27 - Nov 11
Wednesday, Jun 25 - Dec 17

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
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
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
Thursday, May 22 - Aug 7
Sunday, Jun 15 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Tuesday, Jun 17 - Sep 2
Monday, Jun 30 - Sep 22

Intermediate Programming with Python
Sunday, Jun 1 - Aug 24
Monday, Jun 30 - Sep 22

USACO Bronze Problem Series
Tuesday, May 13 - Jul 29
Sunday, Jun 22 - Sep 1

Physics

Introduction to Physics
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
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
Apr 2, 2025
0 replies
ALGEBRA INEQUALITY
Tony_stark0094   2
N 10 minutes ago by Sedro
$a,b,c > 0$ Prove that $$\frac{a^2+bc}{b+c} + \frac{b^2+ac}{a+c} + \frac {c^2 + ab}{a+b} \geq a+b+c$$
2 replies
Tony_stark0094
an hour ago
Sedro
10 minutes ago
Checking a summand property for integers sufficiently large.
DinDean   2
N 31 minutes ago by DinDean
For any fixed integer $m\geqslant 2$, prove that there exists a positive integer $f(m)$, such that for any integer $n\geqslant f(m)$, $n$ can be expressed by a sum of positive integers $a_i$'s as
\[n=a_1+a_2+\dots+a_m,\]where $a_1\mid a_2$, $a_2\mid a_3$, $\dots$, $a_{m-1}\mid a_m$ and $1\leqslant a_1<a_2<\dots<a_m$.
2 replies
DinDean
Yesterday at 5:21 PM
DinDean
31 minutes ago
Bunnies hopping around in circles
popcorn1   22
N 33 minutes ago by awesomeming327.
Source: USA December TST for IMO 2023, Problem 1 and USA TST for EGMO 2023, Problem 1
There are $2022$ equally spaced points on a circular track $\gamma$ of circumference $2022$. The points are labeled $A_1, A_2, \ldots, A_{2022}$ in some order, each label used once. Initially, Bunbun the Bunny begins at $A_1$. She hops along $\gamma$ from $A_1$ to $A_2$, then from $A_2$ to $A_3$, until she reaches $A_{2022}$, after which she hops back to $A_1$. When hopping from $P$ to $Q$, she always hops along the shorter of the two arcs $\widehat{PQ}$ of $\gamma$; if $\overline{PQ}$ is a diameter of $\gamma$, she moves along either semicircle.

Determine the maximal possible sum of the lengths of the $2022$ arcs which Bunbun traveled, over all possible labellings of the $2022$ points.

Kevin Cong
22 replies
popcorn1
Dec 12, 2022
awesomeming327.
33 minutes ago
Iran second round 2025-q1
mohsen   4
N 34 minutes ago by MathLuis
Find all positive integers n>2 such that sum of n and any of its prime divisors is a perfect square.
4 replies
mohsen
Apr 19, 2025
MathLuis
34 minutes ago
Σ to ∞
phiReKaLk6781   3
N Yesterday at 6:12 PM by Maxklark
Evaluate: $ \sum\limits_{k=1}^\infty \frac{1}{k\sqrt{k+2}+(k+2)\sqrt{k}}$
3 replies
phiReKaLk6781
Mar 20, 2010
Maxklark
Yesterday at 6:12 PM
Geometric inequality
ReticulatedPython   0
Yesterday at 5:12 PM
Let $A$ and $B$ be points on a plane such that $AB=n$, where $n$ is a positive integer. Let $S$ be the set of all points $P$ such that $\frac{AP^2+BP^2}{(AP)(BP)}=c$, where $c$ is a real number. The path that $S$ traces is continuous, and the value of $c$ is minimized. Prove that $c$ is rational for all positive integers $n.$
0 replies
ReticulatedPython
Yesterday at 5:12 PM
0 replies
Inequalities
sqing   27
N Yesterday at 3:51 PM by Jackson0423
Let $   a,b    $ be reals such that $  a^2+ab+b^2 =3$ . Prove that
$$ \frac{4}{ 3}\geq \frac{1}{ a^2+5 }+ \frac{1}{ b^2+5 }+ab \geq -\frac{11}{4 }$$$$ \frac{13}{ 4}\geq \frac{1}{ a^2+5 }+ \frac{1}{ b^2+5 }+ab \geq -\frac{2}{3 }$$$$ \frac{3}{ 2}\geq  \frac{1}{ a^4+3 }+ \frac{1}{ b^4+3 }+ab \geq -\frac{17}{6 }$$$$ \frac{19}{ 6}\geq  \frac{1}{ a^4+3 }+ \frac{1}{ b^4+3 }-ab \geq -\frac{1}{2}$$Let $   a,b    $ be reals such that $  a^2-ab+b^2 =1 $ . Prove that
$$ \frac{3}{ 2}\geq \frac{1}{ a^2+3 }+ \frac{1}{ b^2+3 }+ab \geq \frac{4}{15 }$$$$ \frac{14}{ 15}\geq \frac{1}{ a^2+3 }+ \frac{1}{ b^2+3 }-ab \geq -\frac{1}{2 }$$$$ \frac{3}{ 2}\geq \frac{1}{ a^4+3 }+ \frac{1}{ b^4+3 }+ab \geq \frac{13}{42 }$$$$ \frac{41}{ 42}\geq \frac{1}{ a^4+3 }+ \frac{1}{ b^4+3 }-ab \geq -\frac{1}{2 }$$
27 replies
sqing
Apr 16, 2025
Jackson0423
Yesterday at 3:51 PM
Problem of the Week--The Sleeping Beauty Problem
FiestyTiger82   1
N Yesterday at 3:24 PM by martianrunner
Put your answers here and discuss!
The Problem
1 reply
FiestyTiger82
Yesterday at 2:30 PM
martianrunner
Yesterday at 3:24 PM
Inequalities
sqing   4
N Yesterday at 1:09 PM by sqing
Let $ a,b,c $ be real numbers such that $ a^2+b^2+c^2=1. $ Prove that$$ |a-b|+|b-2c|+|c-3a|\leq 5$$$$|a-2b|+|b-3c|+|c-4a|\leq \sqrt{42}$$$$ |a-b|+|b-\frac{11}{10}c|+|c-a|\leq \frac{29}{10}$$
4 replies
sqing
Yesterday at 5:05 AM
sqing
Yesterday at 1:09 PM
Inequalities
nhathhuyyp5c   2
N Yesterday at 12:38 PM by pooh123
Let $a, b, c$ be non-negative real numbers such that $a^2 + b^2 + c^2 = 3$. Find the maximum and minimum values of the expression
\[
P = \frac{a}{a^2 + 2} + \frac{b}{b^2 + 2} + \frac{c}{c^2 + 2}.
\]
2 replies
nhathhuyyp5c
Apr 20, 2025
pooh123
Yesterday at 12:38 PM
Challenging Optimization Problem
Shiyul   5
N Yesterday at 12:28 PM by exoticc
Let $xyz = 1$. Find the minimum and maximum values of $\frac{1}{1 + x + xy}$ + $\frac{1}{1 + y + yz}$ + $\frac{1}{1 + z + zx}$

Can anyone give me a hint? I got that either the minimum or maximum was 1, but I'm sure if I'm correct.
5 replies
Shiyul
Monday at 8:20 PM
exoticc
Yesterday at 12:28 PM
Radical Axes and circles
mathprodigy2011   4
N Yesterday at 7:53 AM by spiderman0
Can someone explain how to do this purely geometrically?
4 replies
mathprodigy2011
Yesterday at 1:58 AM
spiderman0
Yesterday at 7:53 AM
Combinatoric
spiderman0   0
Yesterday at 7:46 AM
Let $ S = \{1, 2, 3, \ldots, 2024\}.$ Find the maximum positive integer $n \geq 2$ such that for every subset $T \subset S$ with n elements, there always exist two elements a, b in T such that:

$|\sqrt{a} - \sqrt{b}| < \frac{1}{2} \sqrt{a - b}$
0 replies
spiderman0
Yesterday at 7:46 AM
0 replies
BMT 2018 Algebra Round Problem 7
IsabeltheCat   5
N Yesterday at 6:56 AM by P162008
Let $$h_n := \sum_{k=0}^n \binom{n}{k} \frac{2^{k+1}}{(k+1)}.$$Find $$\sum_{n=0}^\infty \frac{h_n}{n!}.$$
5 replies
IsabeltheCat
Dec 3, 2018
P162008
Yesterday at 6:56 AM
IMO 2016 Problem 2
shinichiman   63
N Apr 14, 2025 by gladIasked
Source: IMO 2016 Problem 2
Find all integers $n$ for which each cell of $n \times n$ table can be filled with one of the letters $I,M$ and $O$ in such a way that:
[LIST]
[*] in each row and each column, one third of the entries are $I$, one third are $M$ and one third are $O$; and [/*]
[*]in any diagonal, if the number of entries on the diagonal is a multiple of three, then one third of the entries are $I$, one third are $M$ and one third are $O$.[/*]
[/LIST]
Note. The rows and columns of an $n \times n$ table are each labelled $1$ to $n$ in a natural order. Thus each cell corresponds to a pair of positive integer $(i,j)$ with $1 \le i,j \le n$. For $n>1$, the table has $4n-2$ diagonals of two types. A diagonal of first type consists all cells $(i,j)$ for which $i+j$ is a constant, and the diagonal of this second type consists all cells $(i,j)$ for which $i-j$ is constant.
63 replies
shinichiman
Jul 11, 2016
gladIasked
Apr 14, 2025
IMO 2016 Problem 2
G H J
G H BBookmark kLocked kLocked NReply
Source: IMO 2016 Problem 2
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaoAOPS
1519 posts
#55
Y by
We claim that $n$ which are multiples of $9$ work.

Claim: If there is a valid table for $n$, then $9 \mid n$.
Proof. Evidently $3 \mid n$.
Tile the $n \times n$ grid with $3 \times 3$ subtables.
If we take the multiset consisting of rows and columns that go through the center of each subtable, and every diagonal, then it follows that one third of these are each letter. However, this is also just the entire grid with the centers counted an extra $3$ times.
This can only occur if the $\frac{n^2}{9}$ centers are evenly distributed among the three letters, which implies that $9 \mid n$. $\blacksquare$

Claim: There exists a valid table when $9 \mid n$.
Proof. Consider the $3 \times 3$ table where each row is a different letter. Note that the diagonals of this table have one of each letter.
By cyclically permuting the letters in each row, we end up with three different tables.
Then, we can cover a $n \times n$ table with these three different subtables such that each type of table is one third of each row and column by taking a stripe configuration.
Furthermore, diagonals follow as they go through the diagonals of each $3 \times 3$ subtable. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
joshualiu315
2513 posts
#56
Y by
The answer is all multiples of $9$. An arrangement as such works for $n=9$

\[
\begin{array}{|ccc|ccc|ccc|} \hline
I & I & I & M & M & M & O & O & O \\
M & M & M & O & O & O & I & I & I \\
O & O & O & I & I & I & M & M & M \\\hline
I & I & I & M & M & M & O & O & O \\
M & M & M & O & O & O & I & I & I \\
O & O & O & I & I & I & M & M & M \\\hline
I & I & I & M & M & M & O & O & O \\
M & M & M & O & O & O & I & I & I \\
O & O & O & I & I & I & M & M & M \\\hline
\end{array}
\]
Let $n=3k$ and then partition into $k^2$ boxes (of size $3 \times 3$).

Consider the rows with indices $2 \pmod 3$, columns indexed $2 \pmod 3$ and all $4n-2$ diagonals. The center of each of the $k^2$ boxes has been covered $4$ times and the rest $1$ time. Thus, the $k^2$ center squares are equally distributed amongst $I$, $M$, and $O$, implying $9 \mid n$. $\square$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IAmTheHazard
5001 posts
#57
Y by
The answer is $9 \mid n$, by tiling the following construction.
IMOIMOIMO
IMOIMOIMO
IMOIMOIMO
MOIMOIMOI
MOIMOIMOI
MOIMOIMOI
OIMOIMOIM
OIMOIMOIM
OIMOIMOIM

Obviously $3 \mid n$, so let $n=3k$. I will show that $3 \mid k$.

Weight $I$ with $1$, $M$ with $e^{2\pi i/3}$, $O$ with $e^{4\pi i/3}$. Thus the sum of every row, column, and diagonal with length divisible by $3$ is $0$. Conversely, it is clear that if some subset of cells has sum $0$, it must have an equal number of each letter.

Partition the grid into $k^2$ $3 \times 3$ squares. Add (meaning sum together the corresponding statements, yielding a statement where some weighted linear combination of row weights equals $0$) every diagonal, as well as the rows and columns passing through the center of some square. Then subtract every row once. The result is that $3$ times the sum of the $k^2$ weights at the center of every square equals $0$, so there must be an equal number of each letter among these $k^2$ cells, i.e. $3 \mid k^2$ as desired. $\blacksquare$
This post has been edited 2 times. Last edited by IAmTheHazard, Dec 2, 2023, 6:54 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
peppapig_
280 posts
#58
Y by
I claim that the answer is all $n$ such that $n$ is a multiple of $9$.

Label the columns from left to right as $1$, $2$, $\dots$, $n$, and the rows from bottom to top as $1$, $2$, $\dots$, $n$ also. Define $S_{(i,j)}$ to be the square in column $i$ and row $j$. Let $A$ be the set of all squares $S_{(i,j)}$ such that both $i$ and $j$ are $2$ mod $3$, and let $X$ be the set of all squares. Then let $B=X-A$.

Notice that since each row has $\frac{1}{3}$ of its entries as $I$, this implies that $n$ must be a multiple of $3$. Let $n=3k$. I claim that if $3$ does not divide $k$, then there is no way to fill in the grid with $I$'s, $M$'s, and $O$'s such that it satisfies problem conditions. FTSOC, assume that there is such a way to fill in the grid. Now let sets $C$, $D$, $E$, and $F$ be defined as follows

- $C$ is the set of all squares $S_{(i,j)}$ such that $i\equiv 1 \mod 3$,
- $D$ is the set of all squares $S_{(i,j)}$ such that $j\equiv 2 \mod 3$,
- $E$ is the set of all squares $S_{(i,j)}$ such that $i-j\equiv 0 \mod 3$ (AKA the set of all squares on a diagonal with a number of squares that is a multiple of $3$ that goes in the same direction as the diagonal from the bottom left corner to the top right corner),
- and $F$ is the set of all squares $S_{(i,j)}$ such that $i+j\equiv 1 \mod 3$ (AKA the set of all squares on a diagonal with a number of squares that is a multiple of $3$ that goes in the same direction as the diagonal from the bottom right corner to the top left corner).

Note that we then have that,
\[C+D+E+F=4A+B,\]and by problem conditions, since we summed together diagonals that had numbers of squares that were multiples of $3$, columns, and rows, the set $C+D+E+F$ must have equal numbers of squares that have $I$'s, $M$'s, and $O$'s. This implies that the set $4A+B$ must satisfy the same condition.

Since $A+B$ is the set of the entire grid, by problem conditions, this implies that the set $A+B$ must also have equal numbers of squares that have $I$'s, $M$'s, and $O$'s. Therefore, subtracting $A+B$ from $4A+B$, we have that the set $3*A$ must have equal numbers of $I$'s, $M$'s, and $O$'s also, which is equivalent to the set $A$ having equal numbers of $I$'s, $M$'s, and $O$'s, implying that $3\mid |A|$. Since $n=3k$, we have that
\[3\mid|A|=\frac{(3k)^2}{9}=k^2 \iff 3\mid k^2 \iff 3\mid k,\]meaning that $3\mid k$, and therefore $9\mid n$, as we wished to prove.

Now I claim that all $n$ such that $9\mid n$ have constructions. If $n=9m$, we can "tile" the $9m\times 9m$ grid with $m^2$ times with the following $9\times 9$ tile to get our construction.
[asy]
            size(300,300);  
            draw((0,0)--(9,0)--(9,9)--(0,9)--(0,0));
            draw((1,0)--(1,9)); draw((2,0)--(2,9)); draw((3,0)--(3,9)); draw((4,0)--(4,9)); draw((5,0)--(5,9)); draw((6,0)--(6,9)); draw((7,0)--(7,9)); draw((8,0)--(8,9)); 
            draw((0,1)--(9,1)); draw((0,2)--(9,2)); draw((0,3)--(9,3)); draw((0,4)--(9,4)); draw((0,5)--(9,5)); draw((0,6)--(9,6)); draw((0,7)--(9,7)); draw((0,8)--(9,8)); 
            label("$O$", (0.5,0.5)); label("$O$", (0.5,1.5)); label("$O$", (0.5,2.5)); label("$M$", (0.5,3.5)); label("$M$", (0.5,4.5)); label("$M$", (0.5,5.5)); label("$I$", (0.5,6.5)); label("$I$", (0.5,7.5)); label("$I$", (0.5,8.5));
            label("$O$", (3.5,0.5)); label("$O$", (3.5,1.5)); label("$O$", (3.5,2.5)); label("$M$", (3.5,3.5)); label("$M$", (3.5,4.5)); label("$M$", (3.5,5.5)); label("$I$", (3.5,6.5)); label("$I$", (3.5,7.5)); label("$I$", (3.5,8.5));
            label("$O$", (6.5,0.5)); label("$O$", (6.5,1.5)); label("$O$", (6.5,2.5)); label("$M$", (6.5,3.5)); label("$M$", (6.5,4.5)); label("$M$", (6.5,5.5)); label("$I$", (6.5,6.5)); label("$I$", (6.5,7.5)); label("$I$", (6.5,8.5));
            
            label("$I$", (1.5,0.5)); label("$I$", (1.5,1.5)); label("$I$", (1.5,2.5)); label("$O$", (1.5,3.5)); label("$O$", (1.5,4.5)); label("$O$", (1.5,5.5)); label("$M$", (1.5,6.5)); label("$M$", (1.5,7.5)); label("$M$", (1.5,8.5));
            label("$I$", (4.5,0.5)); label("$I$", (4.5,1.5)); label("$I$", (4.5,2.5)); label("$O$", (4.5,3.5)); label("$O$", (4.5,4.5)); label("$O$", (4.5,5.5)); label("$M$", (4.5,6.5)); label("$M$", (4.5,7.5)); label("$M$", (4.5,8.5));
            label("$I$", (7.5,0.5)); label("$I$", (7.5,1.5)); label("$I$", (7.5,2.5)); label("$O$", (7.5,3.5)); label("$O$", (7.5,4.5)); label("$O$", (7.5,5.5)); label("$M$", (7.5,6.5)); label("$M$", (7.5,7.5)); label("$M$", (7.5,8.5));
            
            label("$M$", (2.5,0.5)); label("$M$", (2.5,1.5)); label("$M$", (2.5,2.5)); label("$I$", (2.5,3.5)); label("$I$", (2.5,4.5)); label("$I$", (2.5,5.5)); label("$O$", (2.5,6.5)); label("$O$", (2.5,7.5)); label("$O$", (2.5,8.5));
            label("$M$", (5.5,0.5)); label("$M$", (5.5,1.5)); label("$M$", (5.5,2.5)); label("$I$", (5.5,3.5)); label("$I$", (5.5,4.5)); label("$I$", (5.5,5.5)); label("$O$", (5.5,6.5)); label("$O$", (5.5,7.5)); label("$O$", (5.5,8.5));
            label("$M$", (8.5,0.5)); label("$M$", (8.5,1.5)); label("$M$", (8.5,2.5)); label("$I$", (8.5,3.5)); label("$I$", (8.5,4.5)); label("$I$", (8.5,5.5)); label("$O$", (8.5,6.5)); label("$O$", (8.5,7.5)); label("$O$", (8.5,8.5));
[/asy]
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cj13609517288
1891 posts
#59
Y by
The answer is when $\boxed{9\mid n}$. Clearly $3\mid n$. If $9\nmid n$, sum over all diagonals with number of cells a multiple of $3$, then also sum over every $2$ mod $3$ column. Then subtract every $0$ or $1$ mod $3$ row. Example for $n=6$:
101101
020020
101101
101101
020020
101101

111111
030030
111111
111111
030030
111111

000000
030030
000000
000000
030030
000000

Therefore, the cells with row and column that are both $2$ mod $3$ must have an equal number of I,M,O between them. This is clearly impossible if $9\nmid n$.


For $9\mid n$, we will provide an explicit construction for $n=9$ that can simply be used to tile any $n$ by $n$ grid when $9\mid n$:

IIIMMMOOO
MMMOOOIII
OOOIIIMMM
IIIMMMOOO
MMMOOOIII
OOOIIIMMM
IIIMMMOOO
MMMOOOIII
OOOIIIMMM

We are done. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shendrew7
794 posts
#60 • 2 Y
Y by GeoKing, lelouchvigeo
Our answer is $\boxed{\text{all multiples of 9}}$. Note $n=9$ can be constructed with first row $IIIMMMOOO$, second row $MMMOOOIII$, and so on, and other mutliples of 9 can be constructed by stacking these $9 \times 9$ squares.

Note the following count the same set:
  • The numbers in the desired diagonals plus numbers in rows $2 \pmod 3$ plus numbers in columns $2 \pmod 3$.
  • All cells in the grid plus 3 times the squares in row and column $2 \pmod 3$.

Each of $I$, $M$, and $O$ is guarenteed to appear the same number of times in every subcategory besides the squares in row and column $2 \pmod 3$. Thus we require $\frac{n^2/9}{3}$ to be an integer, so $9 \mid n$. $\blacksquare$
This post has been edited 1 time. Last edited by shendrew7, Dec 30, 2023, 4:09 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
blueprimes
332 posts
#61
Y by
Solved with SigmaPiE. A beautiful problem! :love:

We claim the answer is all positive integers $n$ where $9 \mid n$. To demonstrate a construction, let $n = 9j$ and consider the following $9 \times 9$ grid:
\[\begin{matrix}
I & M & O & I & M & O & I & M & O\\
I & M & O & I & M & O & I & M & O\\
I & M & O & I & M & O & I & M & O\\
M & O & I & M & O & I & M & O & I\\
M & O & I & M & O & I & M & O & I\\
M & O & I & M & O & I & M & O & I\\
O & I & M & O & I & M & O & I & M\\
O & I & M & O & I & M & O & I & M\\
O & I & M & O & I & M & O & I & M\\
\end{matrix}\]Then consider the above as a singular unit and duplicate it as a $j \times j$ array which yields a valid construction for $9j \times 9j$.

To show that $9 \mid n$, let $n = 3k$ and define the cells that lie on exactly $1$ diagonal with a multiple of $3$ amount of cells as hot, and cells that lie on exactly $2$ cold.

The main idea is to consider the rows and columns not passing through the cold cells. We claim that these rows and columns intersect precisely at the hot cells, as outlined in the diagram below for $n = 6$.
https://cdn.artofproblemsolving.com/attachments/2/5/d534212199355c9605583a9644292948b582ab.png
To prove this, partition the grid into $3 \times 3$ subgrids. In each subgrid, there are hot cells at each corner, which the rows/columns not passing through the center intersect at. Hence this easily generalizes to the whole grid.

Now suppose that $a$ cold cells contain an $I$. In each set of diagonals with a multiple of $3$ amount of cells parallel to a particular direction, there exists $\frac{1}{3} \cdot 3 \cdot (1 + 2 + \dots + k + \dots + 1) = k^2$ cells with an $I$ in it. Then the number of hot cells containing an $I$ is $2k^2 - 2a$. Now the total number of cells with $I$ among the rows/columns not passing through a cold cell is $\frac{1}{3} \cdot 2 \cdot 2k \cdot 3k = 4k^2$, but we overcount at the hot cells so we have $4k^2 - (2k^2 - 2a) = 2k^2 + 2a$ cells with $I$ along these rows/columns. Adding the number of $I$ in the cold cells gives $2k^2 + 3a$, which also equals $3k^2$, the total number of $I$ in the grid. Then $k^2 = 3a$ implying $3 \mid k$ as desired.

Our proof is complete!
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AngeloChu
470 posts
#62
Y by
wait I proved that all multiples of 9 work but how do you prove all other numbers dnot work
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bjump
1004 posts
#63
Y by
We claim the answer is $n$ works if and only if $9 \mid n$.
$9\times 9$ construction attached, $9a \times 9a$ construction is tiling an $a\times a$ grid with the $9\times 9$ construction.

To prove $n \not \equiv 0 \pmod{9}$ doesn't work first observe $n \not \equiv 0 \pmod{3}$ doesn't work because you can't have an equal amount of $I$s, $M$s and $O$s in each row. So let $n=3m$ with $m \not \equiv 0 \pmod{3}$, let $I_0$, $I_1$, and $I_2$ denote the number of $I$s that appear in $0$, $1$, and $2$ multiple of $3$ diagonals respectively. Define $M_0$, $M_1$, $M_2$, $O_0$, $O_1$, and $O_2$ similarly. Summing the number of $I$s, $M$s, and $O$s in diagonals with a multiple of $3$ amount of elements gives: $I_1 +2 I_2 = M_1 + 2M_2 = O_1 + 2 O_2 =2m^2$. Considering the total amount of $I$s, $M$s, and $O$s gives: $I_0+I_1+I_2 = M_0 + M_1 + M_2 = O_0+ O_1 + O_2 =3m^2$. Subtracting the first equation from the second gives us $ I_0 -I_2 = M_0 - M_2 = O_0 - O_2=m^2$. Now summing over multiple of $3$ diagonals, and rows/collumns not containing intersections of multiple of $3$ diagonals gives : $I_0+M_0+O_0+ 3(I_1+M_1+O_1)+ 2(I_2+M_2+ O_2) =11n^2$ or $(I_0-I_2)+(M_0-M_2)+(O_0-O_2) \equiv 2 \pmod{3}$. However $(I_0-I_2)+(M_0-M_2)+(O_0-O_2)= 3m^2 \not \equiv 2 \pmod{3}$ a contradiction. $\square$
Attachments:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Jndd
1416 posts
#64
Y by
We claim that $n=9k$, $k\in\mathbb{N}$ works. for the construction, consider a $3\times 3$ block with the columns $YZY$, $XXX$, $ZYZ$ in that order. Let $b_1$, $b_2$, and $b_3$ be the $3\times 3$ blocks with $(X,Y,Z)$ being $(O, M, I)$, $(M, I, O)$, and $(I, O, M)$ respectively. Notice that both diagonals of each $3\times 3$ contains $I, M, O$ so the diagonal condition is satisfied. Each of the rows also contains $I,M,O$ so the row condition is satisfied. Finally, if we let each column of the $9k\times 9k$ have an equal number of $b_1$, $b_2$, and $b_3$ blocks, the column condition is also satisfied. Hence, all $n=9k$, $k\in\mathbb{N}$ works.

Now, we'll show that if $n\not\equiv 0\pmod 9$, then no construction works. It's clear that the only other possibilities are $n\equiv 3,6\pmod 9$, since we need $3\mid n$. Now, for each diagonal in the $n\times n$ grid, add up the number of squares that are $I$, $M$, and $O$ separately. Then, For each row that is the $3i+2$th row for some $i$, add up the number of squares that are $I$, $M$, and $O$, and do the same for the columns. So, because of our conditions, the total count for the number of $I$, $M$, and $O$ squares must be equal.

However, notice that we have counted each square except the squares that are an intersection of two diagonals exactly $1$ time, and the rest have been counted $4$ times. Notice that the number of such squares is $t^2$, where $n=3t$, and $3\nmid t$ when $n\equiv 3,6\pmod 9$. So, when $3\cdot i$, $3\cdot m$, and $3\cdot o$ is subtracted, where $i$, $m$, $o$ are the number of $I$s, $M$s, and $O$s that are at an intersection of two diagonals respectively, the counts for the number of $I$, $M$, and $O$ squares are now unequal because $3\nmid t^2$. However, this gives a contradiction, since summing up the number of squares that are $I$, $M$, and $O$ separately for each row in the grid, there clearly must be an equal number of $I$, $M$, and $O$ squares.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
OronSH
1729 posts
#65 • 3 Y
Y by megarnie, eg4334, racebrook18
We claim $9\mid n$ works.

First clearly notice $3\mid n$. Next add every diagonal divisible by $3$, add every $1\pmod 3$ row and column (zero-indexed) and subtract the entire grid. We get that there are the same number of $I,M,O$ in the $(\tfrac n3)^2$ squares that are $\equiv (1,1)\pmod 3$. This implies $9\mid n$.

To construct, label $(a,b)$ with $\bmod(a+\lfloor\tfrac b3\rfloor,3)$.
This post has been edited 1 time. Last edited by OronSH, Oct 31, 2024, 3:04 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Scilyse
387 posts
#66
Y by
This problem was proposed by Trevor Tao (the brother of Terence Tao) and was indeed inspired by Sudoku!

We claim the answer is all $9 \mid n$. For the construction, take the grid
\[\begin{matrix}
I & I & I & M & M & M & O & O & O \\
M & M & M & O & O & O & I & I & I \\
O & O & O & I & I & I & M & M & M \\
I & I & I & M & M & M & O & O & O \\
M & M & M & O & O & O & I & I & I \\
O & O & O & I & I & I & M & M & M \\
I & I & I & M & M & M & O & O & O \\
M & M & M & O & O & O & I & I & I \\
O & O & O & I & I & I & M & M & M
\end{matrix}\]and loop it.

For the bound, note that $3 \mid n$ obviously. Hence, define the function $I \colon \{1, 2, \dots, 9\} \to \mathbb Z_{\geq 0}$ so that $I(x)$ count the number of $I$'s in the position marked $x$ in the grid below, extended to fill the whole $n \times n$ grid. Define functions $M$ and $O$ similarly.
\[\begin{matrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{matrix}\]Impose coordinates by letting the bottom-left corner be $(1, 1)$, the bottom-right corner be $(n, 1)$, the top-right corner be $(n, n)$ and interpolating. By summing over the diagonals of first type with number of cells divisible by three we get that \[I(1) + I(5) + I(9) = M(1) + M(5) + M(9) = O(1) + O(5) + O(9).\]Similarly, by summing over the diagonals of second type with number of cells divisible by three we get that \[I(3) + I(5) + I(7) = M(3) + M(5) + M(7) = O(3) + O(5) + O(7).\]Additionally, we have that \[I(2) + I(5) + I(8) = M(2) + M(5) + M(8) = O(2) + O(5) + O(8)\]and \[I(4) + I(5) + I(6) = M(4) + M(5) + M(6) = O(4) + O(5) + O(6)\]by summing over specific columns and rows. Hence, \[\sum_{i = 1}^9 I(i) + 3I(5) = \sum_{i = 1}^9 M(i) + 3M(5) = \sum_{i = 1}^9 O(i) + 3O(5).\]But \[\sum_{i = 1}^9 I(i) = \sum_{i = 1}^9 M(i) = \sum_{i = 1}^9 O(i)\]by summing over all columns, so it follows that \[3I(5) = 3M(5) = 3O(5)\]by subtracting. This is only possible if $3 \mid \left(\frac n3\right)^2$ and hence if $9 \mid n$.
This post has been edited 4 times. Last edited by Scilyse, Jan 29, 2025, 6:39 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Saucepan_man02
1323 posts
#67
Y by
Storage
This post has been edited 2 times. Last edited by Saucepan_man02, Feb 6, 2025, 7:07 AM
Reason: EDIT
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Maximilian113
550 posts
#68
Y by
Clearly, $3|n,$ so if $n=3k$ we can draw a $k \times k$ grid of $3 \times 3$ squares. Now, consider:
The union (including double-counting) of all diagonals with a multiple of $3$ squares.
The rows/columns passing through the centers of each $3 \times 3$ squares.

If we "add up" these sets, we end up with the entire grid plus the centers of the $3 \times 3$ grids $3$ times.

It follows that the centers of the $3 \times 3$ grids have an equal number of $I$s, $M$s, and $O$s. Thus $3 | k$ so $9 | n.$

Now, we show that $9|n$ is sufficient. Just use $3$ copies of the following:

111333222
222111333
333222111

where $1, 2, 3$ denote $I, M, O$ in some order.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
gladIasked
648 posts
#69
Y by
good problem :D
The answer is all multiples of $9$.

The construction is fairly easy to see; we can essentially make copies of a $9\times 9$ grid with the sequence $IMOIMOIMO$ for the first three rows, $MOIMOIMOI$ for the next three, and $OIMOIMOIM$ for the final three.

We compute the number of times $I$ appears in the grid (modulo $3$) two different ways. First, there are clearly $\frac{n^2}{3}$ $I$'s by dividing the number of cells in the grid by three.

Next, we sum the number of $I$'s that appear in diagonals and/or in rows/columns that are $2$ modulo $3$ (including multiplicity). Each cell is counted either one or four times. There are actually $\frac{2n^2}{9}$ $I$'s in diagonals and $\frac{2n^2}{9}$ in rows/columns that are $2$ modulo $3$, so there are $\frac{4n^2}{9}$ $I$'s in the grid modulo $3$. Clearly, $3\mid n$, so let $n=3k$. We need $3k^2\equiv 4k^2\pmod 3\implies k^2\equiv 0\pmod 3\implies 3\mid k\implies 9\mid n$, as desired. $\blacksquare$
Z K Y
N Quick Reply
G
H
=
a