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
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
Solve the equation x^3y^2(2y - x) = x^2y^4-36
Eukleidis   9
N a few seconds ago by MITDragon
Source: Greek Mathematical Olympiad 2011 - P1
Solve in integers the equation
\[{x^3}{y^2}\left( {2y - x} \right) = {x^2}{y^4} - 36\]
9 replies
Eukleidis
May 13, 2011
MITDragon
a few seconds ago
c^a + a = 2^b
Havu   2
N 4 minutes ago by dromemsilly
Find $a, b, c\in\mathbb{Z}^+$ such that $a,b,c$ coprime, $a + b = 2c$ and $c^a + a = 2^b$.
2 replies
Havu
May 10, 2025
dromemsilly
4 minutes ago
I got stuck in this combinatorics
artjustinhere237   0
21 minutes ago
Let $S = \{1, 2, 3, \ldots, k\}$, where $k \geq 4$ is a positive integer.
Prove that there exists a subset of $S$ with exactly $k - 2$ elements such that the sum of its elements is a prime number.
0 replies
+1 w
artjustinhere237
21 minutes ago
0 replies
They copied their problem!
pokmui9909   11
N 24 minutes ago by cursed_tangent1434
Source: FKMO 2025 P1
Sequence $a_1, a_2, a_3, \cdots$ satisfies the following condition.

(Condition) For all positive integer $n$, $\sum_{k=1}^{n}\frac{1}{2}\left(1 - (-1)^{\left[\frac{n}{k}\right]}\right)a_k=1$ holds.

For a positive integer $m = 1001 \cdot 2^{2025}$, compute $a_m$.
11 replies
pokmui9909
Mar 29, 2025
cursed_tangent1434
24 minutes ago
Trigonometric Product
Henryfamz   0
25 minutes ago
Compute $$\prod_{n=1}^{45}\sin(2n-1)$$
0 replies
Henryfamz
25 minutes ago
0 replies
3 variable FE with divisibility condition
pithon_with_an_i   1
N 30 minutes ago by Primeniyazidayi
Source: Revenge JOM 2025 Problem 1, Revenge JOMSL 2025 N2, Own
Find all functions $f:\mathbb{N} \rightarrow \mathbb{N}$ such that $$f(a)+f(b)+f(c) \mid a^2 + af(b) + cf(a)$$for all $a,b,c \in \mathbb{N}$.
1 reply
pithon_with_an_i
an hour ago
Primeniyazidayi
30 minutes ago
Gives typical russian combinatorics vibes
Sadigly   1
N 32 minutes ago by Sadigly
Source: Azerbaijan Senior MO 2025 P3
You are given a positive integer $n$. $n^2$ amount of people stand on coordinates $(x;y)$ where $x,y\in\{0;1;2;...;n-1\}$. Every person got a water cup and two people are considered to be neighbour if the distance between them is $1$. At the first minute, the person standing on coordinates $(0;0)$ got $1$ litres of water, and the other $n^2-1$ people's water cup is empty. Every minute, two neighbouring people are chosen that does not have the same amount of water in their water cups, and they equalize the amount of water in their water cups.

Prove that, no matter what, the person standing on the coordinates $(x;y)$ will not have more than $\frac1{x+y+1}$ litres of water.
1 reply
Sadigly
May 8, 2025
Sadigly
32 minutes ago
Roots of unity
Henryfamz   0
43 minutes ago
Compute $$\sec^4\frac\pi7+\sec^4\frac{2\pi}7+\sec^4\frac{3\pi}7$$
0 replies
Henryfamz
43 minutes ago
0 replies
Thailand MO 2025 P3
Kaimiaku   4
N an hour ago by mihaig
Let $a,b,c,x,y,z$ be positive real numbers such that $ay+bz+cx \le az+bx+cy$. Prove that $$ \frac{xy}{ax+bx+cy}+\frac{yz}{by+cy+az}+\frac{zx}{cz+az+bx} \le \frac{x+y+z}{a+b+c}$$
4 replies
Kaimiaku
Today at 6:48 AM
mihaig
an hour ago
Tangents involving a centroid with an isosceles triangle result
pithon_with_an_i   1
N an hour ago by wassupevery1
Source: Revenge JOM 2025 Problem 5, Revenge JOMSL 2025 G5, Own
A triangle $ABC$ has centroid $G$. A line parallel to $BC$ passing through $G$ intersects the circumcircle of $ABC$ at a point $D$. Let lines $AD$ and $BC$ intersect at $E$. Suppose a point $P$ is chosen on $BC$ such that the tangent of the circumcircle of $DEP$ at $D$, the tangent of the circumcircle of $ABC$ at $A$ and $BC$ concur. Prove that $GP = PD$.

Remark 1
Remark 2
1 reply
pithon_with_an_i
an hour ago
wassupevery1
an hour ago
Beautiful numbers in base b
v_Enhance   20
N an hour ago by cursed_tangent1434
Source: USEMO 2023, problem 1
A positive integer $n$ is called beautiful if, for every integer $4 \le b \le 10000$, the base-$b$ representation of $n$ contains the consecutive digits $2$, $0$, $2$, $3$ (in this order, from left to right). Determine whether the set of all beautiful integers is finite.

Oleg Kryzhanovsky
20 replies
v_Enhance
Oct 21, 2023
cursed_tangent1434
an hour ago
Gcd(m,n) and Lcm(m,n)&F.E.
Jackson0423   0
an hour ago
Source: 2012 KMO Second Round

Find all functions \( f : \mathbb{N} \to \mathbb{N} \) such that for all positive integers \( m, n \),
\[
f(mn) = \mathrm{lcm}(m, n) \cdot \gcd(f(m), f(n)),
\]where \( \mathrm{lcm}(m, n) \) and \( \gcd(m, n) \) denote the least common multiple and the greatest common divisor of \( m \) and \( n \), respectively.
0 replies
Jackson0423
an hour ago
0 replies
f(f(n))=2n+2
Jackson0423   0
an hour ago
Source: 2013 KMO Second Round

Let \( f : \mathbb{N} \to \mathbb{N} \) be a function satisfying the following conditions for all \( n \in \mathbb{N} \):
\[
\begin{cases}
f(n+1) > f(n) \\
f(f(n)) = 2n + 2
\end{cases}
\]Find the value of \( f(2013) \).
0 replies
Jackson0423
an hour ago
0 replies
Thailand MO 2025 P2
Kaimiaku   2
N an hour ago by carefully
A school sent students to compete in an academic olympiad in $11$ differents subjects, each consist of $5$ students. Given that for any $2$ different subjects, there exists a student compete in both subjects. Prove that there exists a student who compete in at least $4$ different subjects.
2 replies
Kaimiaku
Today at 7:38 AM
carefully
an hour ago
Disjoint Pairs
MithsApprentice   42
N May 10, 2025 by endless_abyss
Source: USAMO 1998
Suppose that the set $\{1,2,\cdots, 1998\}$ has been partitioned into disjoint pairs $\{a_i,b_i\}$ ($1\leq i\leq 999$) so that for all $i$, $|a_i-b_i|$ equals $1$ or $6$. Prove that the sum \[ |a_1-b_1|+|a_2-b_2|+\cdots +|a_{999}-b_{999}|  \] ends in the digit $9$.
42 replies
MithsApprentice
Oct 9, 2005
endless_abyss
May 10, 2025
Disjoint Pairs
G H J
Source: USAMO 1998
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MithsApprentice
2390 posts
#1 • 7 Y
Y by nmd27082001, mathematicsy, Adventure10, megarnie, HWenslawski, Mango247, ItsBesi
Suppose that the set $\{1,2,\cdots, 1998\}$ has been partitioned into disjoint pairs $\{a_i,b_i\}$ ($1\leq i\leq 999$) so that for all $i$, $|a_i-b_i|$ equals $1$ or $6$. Prove that the sum \[ |a_1-b_1|+|a_2-b_2|+\cdots +|a_{999}-b_{999}|  \] ends in the digit $9$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
paladin8
3237 posts
#2 • 5 Y
Y by vsathiam, Richangles, Adventure10, HWenslawski, Mango247
WLOG, we may assume $a_i > b_i$ or we can just switch $a_i$ and $b_i$.

So the sum just becomes $\sum a_i - \sum b_i$.

But we know $\sum a_i + \sum b_i = \frac{1998 \cdot 1999}{2} = 999 \cdot 1999$ is odd.

So $\sum a_i - \sum b_i$ is odd as well.

Since $\sum a_i - \sum b_i$ is the sum of $999$ $1$'s or $6$'s and is odd, we know there must be an even number of $6$'s. Let $2x$ be the number of $6$'s.

Then $\sum a_i - \sum b_i = 6(2x)+1(999-2x) = 10x + 999 \equiv 9 \pmod{10}$ as desired. QED.
This post has been edited 1 time. Last edited by paladin8, Dec 18, 2005, 10:14 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
zabelman
1072 posts
#3 • 1 Y
Y by Adventure10
Assume WLOG that $6=b_1-a_1=\cdots=b_k-a_k$ and $1=b_{k+1}-a_{k+1}=\cdots=b_n-a_n$. For $i,j\le k$, we say that $\{a_j,b_j\}$ links onto $\{a_i,b_i\}$ if $\{a_i,b_i\}$ if $a_i<a_j<b_i<b_j$ or $a_j<a_i<b_j<b_i$.

Since pair $\{a_i,b_i\}$ links onto$\{a_j,b_j\}$ if and only if $\{a_j,b_j\}$ links onto $\{a_i,b_i\}$, there are an even number of ordered pairs of integers $(i,j)$ such that pair $j$ links onto pair $i$.

For a given $i\le k$, there are an odd number of integers between $a_i$ and $b_i$, so the number of pairs that link onto$\{a_i,b_i\}$ is odd. Thus, the total number of ordered pairs of integers $(i,j)$ such that pair $j$ links onto pair $i$ is congruent to
\[ \sum_{i=1}^k(\text{number of pairs that link onto pair \textit{i}}) \equiv \sum_{i=1}^k 1\equiv k \bmod 2.  \] Therefore, since we already know that this number is even, we find that $k$ is even, and the value of the given sum is
\[ 6k+(999-k) = 999+5k\equiv 9\bmod10.  \]
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Aneo.
1111 posts
#4 • 2 Y
Y by Adventure10, Mango247
Take the equation modulo 5. Then the sum is $ 999\cdot 1\equiv4\pmod{5}$. As shown above, the equation is odd, so the sum must be 9 mod 10.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Arvind_sn
524 posts
#5 • 2 Y
Y by Adventure10, Mango247
Here is one proof. I do not think it's very well written, especially the lemma (did I even need a lemma??) but here it is. (Sorry, I also didn't know how to make the congruence sign, and I was in a hurry, so I just put equal signs.)

lemma

main proof
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
thecmd999
2860 posts
#6 • 2 Y
Y by Adventure10, Mango247
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
codyj
723 posts
#7 • 3 Y
Y by vsathiam, Adventure10, Mango247
Solution by codyj and ithinksomuch
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AnonymousBunny
339 posts
#8 • 1 Y
Y by Adventure10
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Wave-Particle
3690 posts
#9 • 1 Y
Y by Adventure10
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
vsathiam
201 posts
#10 • 2 Y
Y by Delray, Adventure10
Ok my sol was overkill:
Here are the two lemmas. First has been proved by many of above solutions, second is true by construction. (just need to describe it nicely.")

proof sketch
This post has been edited 1 time. Last edited by vsathiam, Aug 26, 2017, 1:13 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Delray
348 posts
#11 • 2 Y
Y by vsathiam, Adventure10
Let $k$ of the differences be six, and let the rest be one. Let $A$, $B$, and $C$ denote the number of even-even, even-odd, and odd-odd pairs. Clearly, there are $B+2A=999$ evens, hence $B$ is odd. It follows that $k$ is even, so $5k+999\equiv 9 \mod 10$ as desired. $\square$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
star32
165 posts
#12 • 2 Y
Y by Mathematicsislovely, Mango247
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6877 posts
#13 • 7 Y
Y by HamstPan38825, Lcz, son7, mathematicsy, ike.chen, math31415926535, Mango247
Let $S$ be the sum. Modulo $2$, \[ S = \sum |a_i-b_i| \equiv \sum (a_i+b_i) 	= 1 + 2 + \dots + 1998 \equiv 1 \pmod 2. \]Modulo $5$, \[ S = \sum |a_i-b_i| = 1 \cdot 999 \equiv 4 \pmod 5. \]So $S \equiv 9 \pmod{10}$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
SenorIncongito
307 posts
#14
Y by
I had the same solution as @above, but I couldn't get the $1$ modulo $2$ part. Why can we add the numbers like that? (I don't really get the $1+2+...+1998$ part).
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
GeronimoStilton
1521 posts
#15
Y by
@above It's because $x\equiv -x\pmod{2}$ for all integers $x$, so $|a_i-b_i|\equiv a_i-b_i\pmod{2}$ regardless of whether $a_i\ge b_i$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HamstPan38825
8866 posts
#16
Y by
Mod 5, the expression is obviously 4 mod 5. Now observe that $$|a_1-b_1| \equiv a_1+b_1 \pmod 2,$$implying the desired sum is congruent to $$\sum_{i=1}^{1998} i \equiv 1 \pmod 2.$$Combining gives the result.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
asdf334
7585 posts
#17 • 3 Y
Y by Math4Life2020, channing421, math31415926535
WLOG let $a_i>b_i$ and let $a_i-b_i=d_i$. Then $d_i$ equals $1$ or $6$, and we only need to show that $$\sum_{i=1}^{999}d_i\equiv 1\pmod 2.$$Notice that $$\sum_{i=1}^{999}d_i+2\sum_{i=1}^{999}b_i=\sum_{i=1}^{999}a_i+\sum_{i=1}^{999}b_i\equiv 1\pmod 2,$$and 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.
Tafi_ak
309 posts
#18
Y by
The number $6$ comes 'even-even' or 'odd-odd'. We claim that the number of $6$'s must be even. If odd then we get greater than $999$ odd or even number, this is a contradiction because $\{1,2,\cdots 1998\}$ have $999$ even and $999$ odd. So
\begin{eqnarray*}
\sum _{i=1}^{999} |a_i-b_i|=6\times 2k+1\times(999-2k)\equiv 10k+999\equiv 9 \hspace{6mm} \text{(mod 10)}
\end{eqnarray*}
This post has been edited 1 time. Last edited by Tafi_ak, Apr 5, 2022, 8:21 AM
Reason: typo
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math31415926535
5617 posts
#20
Y by
By CRT, we can break this into $\pmod{2}$ and $\pmod{5}.$ For $\pmod{2},$ note that $$|a_1-b_1| \equiv a_1+b_1 \pmod{2},$$since absolute value doesn't matter in $\pmod{2}.$ So our sum is just $1+2+...+1998 \equiv 1 \pmod{2}.$ For $\pmod{5},$ just notice that its always $1\pmod{5}$ for all of $|a_1-b_1|, |a_2-b_2|, ...$ so our answer is just $4\pmod{5}.$ Using CRT, we get an answer of $9\pmod{10}.$ $\blacksquare$
This post has been edited 1 time. Last edited by math31415926535, Dec 17, 2021, 3:41 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
th1nq3r
146 posts
#21
Y by
Note that $|a - b| \equiv a - b \equiv a + b \pmod 2$ for all integers $a, b$.

The original sum then becomes $$|a_1 - b_1| + \cdots + |a_{999} - b_{999}| \equiv a_1 + b_1 + \cdots + a_{999} + b_{999} = 1 + \cdots + 1998 \equiv 1 \pmod 2. $$
Now we have that the sum $$|a_1 - b_1| + \cdots + |a_{999} - b_{999}| \equiv \underbrace{1 + \cdots + 1}_{\text{999 times}} = 999 \equiv 4 \pmod 5. $$
Hence this sum is $1 \pmod 2$ and $4 \pmod 5$, so by CRT we have that the sum is $9 \pmod {10}$, as desired. $\blacksquare$
This post has been edited 4 times. Last edited by th1nq3r, Aug 13, 2022, 5:03 AM
Reason: So many edits from the phone
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Alcumusgrinder07
95 posts
#22
Y by
We will consider the sum mod 2 and mod 5 we see that since $6\equiv 1\pmod 2$ the sum of 999 terms has a remainder of 1 when divided by 2 similarly we see that $6\equiv1\pmod 5$ so the sum of 999 terms has a remainder of 4 when divided by 5 so by CRT we see that the sum has a remainder of 9 when divided by 10 which implies that the units digit is 9
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
minusonetwelth
225 posts
#23
Y by
Let the sum be $S$. Note that $S\equiv 999\cdot 1\mod 5\Longleftrightarrow S\equiv 4\mod 5$. Also note that $S$ has the same parity as $a_1+b_1+a_2+b_2+\ldots+a_{999}+b_{999}=1+\ldots+1998$ which clearly odd, so $S\equiv 1\mod 2$. Hence the remainder of $S\mod 10$ is unique by the Chinese Remainder Theorem, and it is easy to check that it is $9$ indeed.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
minusonetwelth
225 posts
#24
Y by
Alcumusgrinder07 wrote:
We will consider the sum mod 2 and mod 5 we see that since $6\equiv 1\pmod 2$ the sum of 999 terms has a remainder of 1 when divided by 2 similarly we see that $6\equiv1\pmod 5$ so the sum of 999 terms has a remainder of 4 when divided by 5 so by CRT we see that the sum has a remainder of 9 when divided by 10 which implies that the units digit is 9

$6\equiv 1\mod 2$???
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Taco12
1757 posts
#25
Y by
Note that the expression is $4 \pmod 5$, so it suffices to show that it is odd. But notice that we have $$\left|a_i-b_i\right| \equiv a_i-b_i \pmod 2,$$and we have $1+2+3+\dots+1998 \equiv 1 \pmod 2$, which finishes.
This post has been edited 1 time. Last edited by Taco12, Jan 15, 2023, 4:23 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
RedFireTruck
4223 posts
#26
Y by
Since $1$ and $6$ differ by $5$, the ending digit is $9$ whenever there is an odd number of $i$ such that $|a_i-b_i|=1$ and is $4$ otherwise. There are $999$ odds and $999$ evens so there can't be an even number of $i$ such that $|a_i-b_i|=1$, because that would imply an even number of odds and an even number of evens. Therefore, the ending digit must be $9$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
egg185
103 posts
#27
Y by
MithsApprentice wrote:
Suppose that the set $\{1,2,\cdots, 1998\}$ has been partitioned into disjoint pairs $\{a_i,b_i\}$ ($1\leq i\leq 999$) so that for all $i$, $|a_i-b_i|$ equals $1$ or $6$. Prove that the sum \[ |a_1-b_1|+|a_2-b_2|+\cdots +|a_{999}-b_{999}|  \]ends in the digit $9$.

my teach gimme that as homework
Click to reveal hidden text
This post has been edited 3 times. Last edited by egg185, Aug 4, 2023, 6:37 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shendrew7
796 posts
#28
Y by
Suppose there are $x$ pairs with difference $1$. Then our sum is \[(999-x)+6x = 999+5x,\]which has units digit either $4$ or $9$.

Note that this sum also has the same parity as $1 + 2 + \ldots + 1998$, which is odd, since \[\lvert a_i - b_i \rvert \equiv a_i - b_i \equiv a_i + b_i \mod 2.\]
Thus our sum has units digit $9$. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
gracemoon124
872 posts
#29 • 1 Y
Y by salemath
Clearly, the desired sum is $4\pmod 5$, so it remains to show that it’s $1\pmod 2$.

Because $|a-b|\equiv a-b\equiv a+b\pmod 2$ for any integers $a$ and $b$, this means
\[|a_1-b_1|+|a_2-b_2|+\dots+|a_{999}-b_{999}|\equiv 1+2+\dots + 1998\equiv 1\pmod 2\]and we are done. $\square$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathmax12
6051 posts
#30
Y by
We note that this sum is $\equiv 4\pmod{5},$ we need to prove that this is $1 \pmod{2},$ note that $|a-b|,$ has the same parity as $a+b,$ so we need to prove $a+b \equiv 1\pmod{2},$ so $|a_1-b_1|+|a_2-b_2|+\cdots +|a_{999}-b_{999}|  \equiv 1+2+3...+1998 \equiv 1\pmod{2},$ hence proved $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
joshualiu315
2534 posts
#31
Y by
WLOG assume $a_i>b_i$ for each $i$.

Notice that

\[\sum a_i + \sum b_i = 999 \cdot 1999,\]
which is odd. Thus, in order to have integer values, we must have that $\sum a_i - \sum b_i$ is odd. Thus, the number of $6$'s, denote as $2k$, is even. We have

\[\sum a_i - \sum b_1 = 6 \cdot 2k + (999-2k) = 10k+999 \equiv 9 \pmod{10}. \ \square\]
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
kamatadu
480 posts
#32 • 1 Y
Y by GeoKing
WLOG $a_i>b_i$ for all $i$.

Now note that,
\[ \displaystyle\sum |a_i-b_i| = \displaystyle\sum a_i - b_i \equiv \displaystyle\sum a_i + b_i = \dfrac{1998\cdot 1999}{2} \equiv 1 \pmod{2}. \]
Also,
\[ \displaystyle\sum a_i - b_i \equiv \displaystyle\sum 1 = 999 \equiv 4 \pmod{5}. \]
Thus combining these by CRT, we get that $\displaystyle\sum |a_i-b_i| \equiv 9 \pmod{10}$. :yoda:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
SouradipClash_03
166 posts
#33 • 1 Y
Y by GeoKing
Cute.
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
LogiBobb
8 posts
#35 • 1 Y
Y by OronSH
$|a_i - b_i| = 1$ or $6$. Say $|a_i - b_i| = 1$ for $k$ of these $999$ pairs. The sum would then be equal to $k + 6(999 - k) = 5994 - 5k$. Note that a pair with difference $6$ has same parity and a pair with difference $1$ does not. All pairs of difference $6$ would give us an even number of even numbers and an even number of odd numbers. If $k$ was even, that suggests there are even numbers of odd numbers and even numbers of even numbers. However, since there is a total of $999$ even numbers and $999$ odd numbers, this cannot be true. So thus, $k$ is odd, and the sum would end with digit $9$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bjump
1028 posts
#36
Y by
solution
This post has been edited 1 time. Last edited by bjump, Jan 7, 2024, 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.
think4l
344 posts
#37
Y by
Overkill solution, but proud of it :play_ball:

For the sake of simplicity, we will write all pairs $\{a_i, b_i\}$ such that $a_i < b_i$.

Let there be $x$ six-pairs $(a_i, b_i)$ such that $|a_i - b_i|=6$. Then, there are $999-x$ one-pairs such that $|a_i - b_i| = 1$. The given expression evaluates to $$6x + (999-x) = 5x + 999$$For this to be $9 \pmod{10}$, it suffices to show that $x$ is even.

Note that along with any six-pair $(n, n+6)$, in order to make successful pairings, we must have either exactly one of the six-pairs $$(n+1, n+7), (n+3, n+9), (n+5, n+11),$$or one of the following sets of three six-pairs $$\{(n+1, n+7), (n+2, n+8), (n+3, n+9)\}$$$$\{(n+1, n+7), (n+2, n+8), (n+5, n+11)\}$$$$\{(n+1, n+7), (n+4, n+10), (n+5, n+11)\}$$
Each option generates an even number of six-pairs, so $x$ is even, as desired $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AshAuktober
1007 posts
#38
Y by
Modulo 2, $$ |a_1-b_1|+|a_2-b_2|+\cdots +|a_{999}-b_{999}| \equiv a_1 + \cdots + a_{999} + b_1 + \cdots + b_{999}$$$$= \frac{1998 \cdot 1999}{2} \equiv 1 \pmod{2}.$$Note that $|a_i - b_i| \equiv 1 \pmod{5} \forall i$, so $$ |a_1-b_1|+|a_2-b_2|+\cdots +|a_{999}-b_{999}| \equiv 1 + \cdots + 1 \equiv 999 \equiv 4 \pmod{5}.$$Now from the Chinese Remainder Theorem, $ |a_1-b_1|+|a_2-b_2|+\cdots +|a_{999}-b_{999}| \equiv 9 \pmod{10}$. $\square$
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
#39
Y by
We see that each $|a_i-b_i|\equiv 1\pmod 5$, and $999\equiv 4\pmod 5$, so $|a_1-b_1|+|a_2-b_2|+\dotsb +|a_{999}-b_{999}|\equiv 4\pmod 5$. Note that the $|a_i-b_i|\equiv a_i+b_i\pmod 2$, so $|a_1-b_1|+|a_2-b_2|+\dotsb +|a_{999}-b_{999}|\equiv \frac{1998\cdot 1999}{2}\equiv 1\pmod 2$. Thus, $|a_1-b_1|+|a_2-b_2|+\dotsb +|a_{999}-b_{999}|\equiv 9\pmod {10}$. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
megarnie
5608 posts
#40
Y by
Since each $|a_i - b_i|$ is $1\pmod 5$, the sum is clearly $4\pmod 5$. It suffices to show that the sum is odd. Clearly the absolute value when taking the parity, so the sum has the same parity as $\sum a_i - \sum b_i$. Let $x = \sum a_i$. We have $\sum (a_i + b_i) = \sum a_i + \sum b_i =  1 + 2 + \cdots + 1998$ is odd, so $\sum b_i$ has the opposite parity of $\sum a_i$, implying that $\sum a_i - \sum b_i$ is odd, as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
megahertz13
3183 posts
#41
Y by
It is clear that $$|a_1-b_1|+|a_2-b_2|+\dotsb +|a_{999}-b_{999}|\equiv 4\pmod 5.$$The only thing left is to prove that $$|a_1-b_1|+|a_2-b_2|+\dotsb +|a_{999}-b_{999}|\equiv 1\pmod 2.$$However, $$|a_1-b_1|+|a_2-b_2|+\dotsb +|a_{999}-b_{999}|$$$$\equiv a_1-b_1+a_2-b_2+\dots+a_{999}-b_{999}$$$$\equiv a_1+b_1+a_2+b_2+\dots+a_{999}+b_{999}$$$$=\frac{1998\cdot 1999}{2}$$$$\equiv 1\pmod 2.$$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Maximilian113
575 posts
#42
Y by
Let there be $x$ pairs that sum to $6,$ and $y$ pairs that sum to $1.$ Then $x+y=999 \implies 6x+y \equiv 4 \pmod 5.$ Meanwhile, if WLOG $a_i > b_i$ for all $i,$ then our sum equals $$1998 \cdot 1999/2 - 2\sum b_i \equiv 1 \pmod 2,$$so by CRT it ends in the digit $9,$ so we are done. QED
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
quantam13
113 posts
#43
Y by
Call the sum $X$. Since the sum of all the numbers from 1 to 1998 is odd, $X$ is odd and hence it suffices to prove the $X\equiv 4$ modulo 5. But that is trivial since there are 999 terms in the sum, each of which are 1 modulo 5.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
NerdyNashville
14 posts
#44
Y by
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
endless_abyss
49 posts
#45
Y by
Nice!

Claim: $\sum | a_i - b_i | \equiv 1$ (mod $2$)
$\sum | a_i - b_i | \equiv \sum a_i + b_i \equiv 1$ (mod $2$)
so the claim is proven.

Claim: $\sum | a_i - b_i | \equiv -1$ (mod $5$)
If there are x number of $|a_i - b_i| = 6 \equiv 1$ (mod $5$)
there are $999 - x$ $|a_i - b_i$
such that
$Ia_i - b_i| = 1 \equiv 1$ (mod $5$)
we're done after summing them up.

combining the two claims gives us $\sum | a_i - b_i | \equiv -1$ (mod $10$) as desired.

$\square$
:starwars:
Z K Y
N Quick Reply
G
H
=
a