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

G
Topic
First Poster
Last Poster
k a May Highlights and 2025 AoPS Online Class Information
jlacosta   0
May 1, 2025
May is an exciting month! National MATHCOUNTS is the second week of May in Washington D.C. and our Founder, Richard Rusczyk will be presenting a seminar, Preparing Strong Math Students for College and Careers, on May 11th.

Are you interested in working towards MATHCOUNTS and don’t know where to start? We have you covered! If you have taken Prealgebra, then you are ready for MATHCOUNTS/AMC 8 Basics. Already aiming for State or National MATHCOUNTS and harder AMC 8 problems? Then our MATHCOUNTS/AMC 8 Advanced course is for you.

Summer camps are starting next month at the Virtual Campus in math and language arts that are 2 - to 4 - weeks in duration. Spaces are still available - don’t miss your chance to have an enriching summer experience. 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 upcoming events:
[list][*]May 9th, 4:30pm PT/7:30pm ET, Casework 2: Overwhelming Evidence — A Text Adventure, a game where participants will work together to navigate the map, solve puzzles, and win! All are welcome.
[*]May 19th, 4:30pm PT/7:30pm ET, What's Next After Beast Academy?, designed for students finishing Beast Academy and ready for Prealgebra 1.
[*]May 20th, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 1 Math Jam, Problems 1 to 4, join the Canada/USA Mathcamp staff for this exciting Math Jam, where they discuss solutions to Problems 1 to 4 of the 2025 Mathcamp Qualifying Quiz!
[*]May 21st, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 2 Math Jam, Problems 5 and 6, Canada/USA Mathcamp staff will discuss solutions to Problems 5 and 6 of the 2025 Mathcamp Qualifying Quiz![/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
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
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, 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
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
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
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
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

Paradoxes and Infinity
Mon, Tue, Wed, & Thurs, Jul 14 - Jul 16 (meets every day of the week!)

Intermediate: Grades 8-12

Intermediate Algebra
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
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
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
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
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

AIME Problem Series A
Thursday, May 22 - Jul 31

AIME Problem Series B
Sunday, Jun 22 - Sep 21

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
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
May 1, 2025
0 replies
Coolabra
Titibuuu   3
N 13 minutes ago by sqing
Let \( a, b, c \) be distinct real numbers such that
\[
a + b + c + \frac{1}{abc} = \frac{19}{2}
\]Find the maximum possible value of \( a \).
3 replies
+2 w
Titibuuu
Today at 2:21 AM
sqing
13 minutes ago
interesting functional
Pomegranat   1
N 22 minutes ago by NicoN9
Source: I don't know sorry
Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) such that for all positive real numbers \( x \) and \( y \), the following equation holds:
\[
\frac{x + f(y)}{x f(y)} = f\left( \frac{1}{y} + f\left( \frac{1}{x} \right) \right)
\]
1 reply
Pomegranat
an hour ago
NicoN9
22 minutes ago
Is the result of this is the same as cauchy?
ItzsleepyXD   0
22 minutes ago
Source: curiosity
Prove or disprove that for all continuous or monotonic function $f : \mathbb{R}^2 \to \mathbb{R}$ .The solution to $$f(a,x)+f(b,y)=f(a+b,x+y) \text{ for all }a,b,x,y \in \mathbb{R}$$is only $f(x,y)=cx+dy$ for some $c,d \in \mathbb{R}$
0 replies
ItzsleepyXD
22 minutes ago
0 replies
a fractions problem
kjhgyuio   1
N 25 minutes ago by Ash_the_Bash07
.........
1 reply
kjhgyuio
an hour ago
Ash_the_Bash07
25 minutes ago
No more topics!
Bushy and Jumpy and the unhappy walnut reordering
popcorn1   51
N Apr 22, 2025 by Blast_S1
Source: IMO 2021 P5
Two squirrels, Bushy and Jumpy, have collected 2021 walnuts for the winter. Jumpy numbers the walnuts from 1 through 2021, and digs 2021 little holes in a circular pattern in the ground around their favourite tree. The next morning Jumpy notices that Bushy had placed one walnut into each hole, but had paid no attention to the numbering. Unhappy, Jumpy decides to reorder the walnuts by performing a sequence of 2021 moves. In the $k$-th move, Jumpy swaps the positions of the two walnuts adjacent to walnut $k$.

Prove that there exists a value of $k$ such that, on the $k$-th move, Jumpy swaps some walnuts $a$ and $b$ such that $a<k<b$.
51 replies
popcorn1
Jul 20, 2021
Blast_S1
Apr 22, 2025
Bushy and Jumpy and the unhappy walnut reordering
G H J
G H BBookmark kLocked kLocked NReply
Source: IMO 2021 P5
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
JAnatolGT_00
559 posts
#41 • 1 Y
Y by cubres
Assume the opposite. Firstly paint each walnut white, and on $k-$th move paint $k-$th walnut black. By assumption each move swaps walnuts of same color, in particular it preserves parity of number of adjacent pairs of both black walnuts, which is $0$ at the beginning and $2021$ at the end, contradiction.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
PROA200
1748 posts
#42 • 3 Y
Y by sabkx, ike.chen, cubres
Wow! It has been a while since I first saw this problem, but for some reason, I never had the confidence to legitimately think about it.

Tag each walnut with a tag $t_i = 1$ at the beginning. The $1$s will represent the walnuts that have yet to be chosen as a value of $k$. Every move, we choose a walnut tagged with a $1$ and change the tag to a $0$, assuming for the sake of contradiction that the two walnuts adjacent to it are always both tagged with $1$s or $0$s (i.e., have either both not been chosen already or have both been chosen).

Of course, in each case, we have that the sum (indices mod $2021$)
\[\sum_i |t_i - t_{i+1}|\]changes by exactly $2$. But at the beginning, it's $0$, and at the end, it's $0$. This is a contradiction modulo $4$ -- after an odd number of moves, the sum should be $2\pmod 4$! This completes the proof.
This post has been edited 1 time. Last edited by PROA200, Mar 7, 2023, 6:43 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ihatemath123
3446 posts
#43 • 1 Y
Y by cubres
Call a walnut that has been the center of a move a "changed" walnut.

For the sake of contradiction, assume that on every move, Jumpy swaps two walnuts that are either both less than the center one, or both greater. Then, Jumpy is either swapping two changed walnuts, or two yet-to-be-changed walnuts. Either way, one walnut becomes changed at each move, and the positions of the others remain constant.

Number each hole in clockwise order: $1, 2, \dots, 2021$. Because of what we established before, once a hole contains a changed walnut, it will always contain a changed walnut. Therefore, we may refer to each hole as "changed" or "unchanged" - each move is equivalent to picking a hole and changing it. Set, WLOG, walnut $1$ in hole $1$. Then, at some point, we must change hole $2$ - before we do that though, hole $3$ has to be changed. When we change hole $3$, holes $2$ and $4$ must both be unchanged, so we also must change hole $3$ before hole $4$. So when we change hole $4$, both holes $3$ and holes $5$ must be changed. This pattern continues, until we have that hole $2022$ must be changed after hole $2021$, which is a contradiction, since hole $2022$ is hole $1$, which we assumed was changed first.

Therefore, Jumpy must swap two walnuts $a$ and $b$ with $a < k < b$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
huashiliao2020
1292 posts
#44 • 1 Y
Y by cubres
Assign a walnut a signature if it's been the center of a reordering the number 1, and 0 otherwise. AFTSOC Jumpy is swapping two walnuts that are both less or greater than the indice of the center walnut; in particular, Jumpy swaps two walnuts with the same signature, hence a hole never changes it's signature. WLOG set walnut 1 in hole 1 by shifting hole \#s; when we change hole 2, we must have that hole 3 had a signature of 1, since hole 1 has a signature of 1, whence hole 4 has a signature of 0 before changing hole 3, etc. We continue this way until we get that hole 2022=1 must have a signature of 0 before changing hole 2021, contradiction since we gave hole 1 a signature of 1 first. We conclude. :surf:

Remark. Signature seems like such a common word to assign now, I've seen it in several problems lol
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pi271828
3370 posts
#45 • 1 Y
Y by cubres
We assume the opposite for the sake of contradiction. Label a hole $k$ black on the kth move when it is chosen, and keep it black for the remaining of the process. Keep a hole white if it hasn't been chosen yet. Notice that on each move we should be swapping holes of the same color, and obviously we will turn the middle hole from white to black. Also note that once a slot holds a black hole, it must always hold a black hole otherwise the problem is proved. Now, simply consider an arc of the circle that is $B\underbrace{WW \dots WW}_{x}B$. The color of the endpoints of this arc can never be changed otherwise the problem is proved, so we shift our attention to the inner part. We prove by strong induction that if $2 \mid x$, then there must be a move that swaps two holes of opposite color. The base case of $x = 2$ is clear. Now assume that for an even $n$, that all evens less than $n$ follow the hypothesis. One of the inner $W$'s will be chosen and will be turned to a $B$. Now, we have $B\underbrace{W \dots W}_{a}B\underbrace{W \dots W}_{b}B$, where $a+b$ is odd, implying that one of $a$ and $b$ is even, so we have completed induction. Now, notice that after the first two moves, there must be an arc that will contain an even number of $W$'s that connects the two black holes because $2021$ is odd, so we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Shreyasharma
682 posts
#46 • 2 Y
Y by eggymath, cubres
Assume for the sake of contradiction otherwise. Rephrase the problem in terms of the color of a walnut. Color the $k$-th walnut red on the $k$-th turn. Note that as we swap two walnuts of the same color on the $k$-th term by assumption, the coloring remains the same.

Clearly we begin with $0$ pairs of adjacent red walnuts and end with $2021$ pairs of adjacent red walnuts. Now on any given turn a walnut that changes color has two neighbors of the same color, so the pairs of adjacent red walnuts either goes up by $2$ or by $0$, a contradiction.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
RGB
19 posts
#47 • 2 Y
Y by eggymath, cubres
Consider the process that happens after Jumpy rearranges the walnuts.

Initially, each walnut has a unique position around the circular pattern of holes. After Jumpy's sequence of moves, some walnuts might return to their original positions, while others might have moved around.

Now, let's imagine that none of the swaps involve a pair of walnuts where one walnut has a number smaller than $k$ and the other walnut has a number larger than $k$. This means that for every swap that occurs during Jumpy's sequence of moves, either both walnuts have numbers smaller than $k$, or both walnuts have numbers larger than $k$.

Let's consider the total displacement of all the walnuts that have numbers smaller than $k$ after Jumpy's moves. Similarly, let's consider the total displacement of all the walnuts that have numbers larger than $k$ after Jumpy's moves.

The sum of displacements of walnuts smaller than $k$ and walnuts larger than $k$ around the circle must be equal in magnitude but opposite in direction (due to the circular nature of the arrangement). This is because each swap results in a net displacement of $0$ for the overall circle, as each walnut returns to its original position after a full circle.

If there were no swap that involves a pair of walnuts where one walnut has a number smaller than $k$ and the other walnut has a number larger than $k$, then the sum of displacements of walnuts smaller than $k$ and the sum of displacements of walnuts larger than $k$ would have to be different, leading to a contradiction.

Therefore, there must be a swap involving a pair of walnuts $a$ and $b$ such that $a<k<b$ during Jumpy's sequence of moves.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cj13609517288
1915 posts
#48 • 2 Y
Y by eggymath, cubres
Suppose that after the $m$-th move, walnut $m$'s value becomes $0$. If we can find a value of $k$ that works here, it must also work in the original problem as if $m<k$, then $0<k$, and if $m>k$, then $m$ hasn't turned into $0$ yet. Therefore, we now want to show that $0$ and something $\ne 0$ swapped during the process(call this a "forbidden move").

Suppose not. After the first move, there is a "contiguous chain" of $2020$ nonzero numbers. We can never have an end of a chain perform their swap unless the chain is of length $1$.

Claim. An even chain will always cause a forbidden move.
Proof. Let the chain be of length $2n$. We will strong induct on $n$. Base case $n=1$ is trivial, so assume that $1,2,\dots,n-1$ work. Then on the first move of that chain, the chain will be split into two parts of length $a$ and $2n-1-a$, one of which will have a smaller even length, which will cause a forbidden move.

Thus our chain of $2020$ will cause a forbidden move, contradiction. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
lnzhonglp
120 posts
#49 • 2 Y
Y by eggymath, cubres
Suppose otherwise. On the $k$th turn, color the $k$th walnut red. Each walnut we color red must be between two walnuts of the same color. The number of pairs of adjacent red walnuts changes by $2$ or $0$, but we must go from $0$ to $2021$. Therefore, this is impossible.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
OronSH
1745 posts
#50 • 4 Y
Y by megarnie, eggymath, ihatemath123, cubres
Consider the same operation, but after a swap you add $2021$ to the label of the walnut just operated on. Every swap now satisfies $k<a,b.$ We want to then show that there is some swap that swaps a number $\le 2021$ and a number $>2021.$ This is doable iff at every step, between every two consecutive $>2021$ walnuts there is an odd number of $\le 2021$ walnuts (by induction), but this is false after the first step, since there are $2020$ walnuts between the one with label $2022$ and itself.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
dolphinday
1324 posts
#51 • 2 Y
Y by eggymath, cubres
At the start, paint all walnuts white and then paint walnut $k$ on the $k$th turn black.
Then notice that the condition $a < k < b$ is equivalent to swapping two walnuts of differing colors. So then FTSOC assume that throughout, we always swap two walnuts of the same color.
However notice that the number of adjacent pairs of black walnuts is always $0 \pmod 2$ as we can only add a black walnut in between two black walnuts or in between two white walnuts. This is a contradiction as our final state with $2021$ black walnuts has an odd number, so we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HamstPan38825
8862 posts
#52 • 1 Y
Y by cubres
I found this very straightforward for IMO5? This is one of those ``quasi-invariant" problems where simplifying the structure inexplicably yields a neat solution.

Call an acorn large if we have already performed a move on it and small otherwise. Assume for the sake of contradiction that there exists an ordering for which the condition is not true. Let the dynamic variable $k$ denote the number of groups between two consecutive large acorns that have an even number of small acorns between them.

Claim. The parity of $k$ is constant.

Proof. In any move that does not satisfy the condition, one small acorn surrounded by either two large or two small acorns is converted into a large acorn. If the acorn were originally part of an odd group, the first case eliminates this odd group, and the second case splits the odd group into two even or two odd groups. If the acorn were originally part of an even group, the first case is impossible, and the second case splits the even group into one even and one odd group. In both cases, the parity of $k$ does not change. $\blacksquare$

But after the first move, $k = 1$ is odd, and after all moves are complete, all acorns are large, so $k=0$. This yields a contradiction.
This post has been edited 1 time. Last edited by HamstPan38825, Jun 15, 2024, 12:18 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Martin2001
152 posts
#53 • 1 Y
Y by cubres
Rephrase the problem as so: Let there be $2021$ acorns arranged in a circle, and for each move we can color exactly one acorn red. We show that it is impossible to completely color all acorns red without coloring an acorn red where the immediately adjacent acorns are different colors.
We show that it is impossible for a string with an even number of acorns, where both endpoints of the string start as red. Note that this is an easy induction starting from where there are $4$ acorns. Because the original circle of $2021$ acorns can be arranged as a string with $2022$ acorns with both endpoints starting as red, we're done$.\blacksquare$
This post has been edited 1 time. Last edited by Martin2001, Aug 26, 2024, 1:04 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mathandski
757 posts
#54 • 1 Y
Y by cubres
$         $
Attachments:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Blast_S1
358 posts
#55 • 1 Y
Y by cubres
Let $f(n)$ be $1$ if both neighbors of $n$ are greater, $-1$ if both are smaller, and $0$ otherwise. Since the sum of $f(n)$ over all $n$ is $0$, and since $2021$ is odd, it follows that there exist an odd number of $n$ such that $f(n) = 0$.

Consider the $k^\text{th}$ move. If $f(k) = 0$, then we're done. If $f(k) = 1$, then the move only affects $f(n)$ for $n > k$. If $f(k) = -1$, then the move only affects $f(n)$ for $n < k$. The parity of the number of $n > k$ for which $f(n) = 0$ is invariant in the latter two cases. The end.
Z K Y
N Quick Reply
G
H
=
a