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
1 viewing
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
2001-th sequence term less than 1001
orl   6
N 6 minutes ago by Bryan0224
Source: CWMO 2001, Problem 1
The sequence $ \{x_n\}$ satisfies $ x_1 = \frac {1}{2}, x_{n + 1} = x_n + \frac {x_n^2}{n^2}$. Prove that $ x_{2001} < 1001$.
6 replies
orl
Dec 27, 2008
Bryan0224
6 minutes ago
inequality involving GCD and square roots
gaussious   0
12 minutes ago
how to even approach this?
0 replies
gaussious
12 minutes ago
0 replies
Inequality, inequality, inequality...
Assassino9931   1
N 12 minutes ago by sqing
Source: Al-Khwarizmi Junior International Olympiad 2025 P6
Let $a,b,c$ be real numbers such that \[ab^2+bc^2+ca^2=6\sqrt{3}+ac^2+cb^2+ba^2.\]Find the smallest possible value of $a^2 + b^2 + c^2$.

Binh Luan and Nhan Xet, Vietnam
1 reply
2 viewing
Assassino9931
2 hours ago
sqing
12 minutes ago
a fractions problem
kjhgyuio   0
20 minutes ago
.........
0 replies
kjhgyuio
20 minutes ago
0 replies
Find smallest value of (x^2 + y^2 + z^2)/(xyz)
orl   9
N 21 minutes ago by Bryan0224
Source: CWMO 2001, Problem 4
Let $ x, y, z$ be real numbers such that $ x + y + z \geq xyz$. Find the smallest possible value of $ \frac {x^2 + y^2 + z^2}{xyz}$.
9 replies
orl
Dec 27, 2008
Bryan0224
21 minutes ago
algebraic inequality
produit   0
36 minutes ago
Positive a, b, c satisfy a + b + c = ab + bc + ca. Prove that
a + b + c + 1 ⩾ 4abc.
0 replies
produit
36 minutes ago
0 replies
pqr/uvw convert
Nguyenhuyen_AG   9
N 39 minutes ago by Rhapsodies_pro
Source: https://github.com/nguyenhuyenag/pqr_convert
Hi everyone,
As we know, the pqr/uvw method is a powerful and useful tool for proving inequalities. However, transforming an expression $f(a,b,c)$ into $f(p,q,r)$ or $f(u,v,w)$ can sometimes be quite complex. That's why I’ve written a program to assist with this process.
I hope you’ll find it helpful!

Download: pqr_convert

Screenshot:
IMAGE
IMAGE
9 replies
Nguyenhuyen_AG
Apr 19, 2025
Rhapsodies_pro
39 minutes ago
interesting functional
Pomegranat   0
an hour ago
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)
\]
0 replies
Pomegranat
an hour ago
0 replies
Brilliant guessing game on triples
Assassino9931   0
an hour ago
Source: Al-Khwarizmi Junior International Olympiad 2025 P8
There are $100$ cards on a table, flipped face down. Madina knows that on each card a single number is written and that the numbers are different integers from $1$ to $100$. In a move, Madina is allowed to choose any $3$ cards, and she is told a number that is written on one of the chosen cards, but not which specific card it is on. After several moves, Madina must determine the written numbers on as many cards as possible. What is the maximum number of cards Madina can ensure to determine?

Shubin Yakov, Russia
0 replies
Assassino9931
an hour ago
0 replies
Sequence
Titibuuu   2
N an hour ago by Tkn
Let \( a_1 = a \), and for all \( n \geq 1 \), define the sequence \( \{a_n\} \) by the recurrence
\[
a_{n+1} = a_n^2 + 1
\]Prove that there is no natural number \( n \) such that
\[
\prod_{k=1}^{n} \left( a_k^2 + a_k + 1 \right)
\]is a perfect square.
2 replies
Titibuuu
Today at 2:22 AM
Tkn
an hour ago
Combinatorics
imnotgoodatmathsorry   0
an hour ago
Source: By @irregular22104
Given two positive integers $a,b$ written on the board. We apply the following rule: At each step, we will add all the numbers that are the sum of the two numbers on the board so that the sum does not appear on the board. For example, if the two initial numbers are $2,5$; then the numbers on the board after step 1 are $2,5,7$; after step 2 are $2,5,7,9,12;...$
1) With $a = 3$; $b = 12$, prove that the number 2024 cannot appear on the board.
2) With $a = 2$; $b = 34$, prove that the number 2024 can appear on the board.
0 replies
imnotgoodatmathsorry
an hour ago
0 replies
Iranian geometry configuration
Assassino9931   0
2 hours ago
Source: Al-Khwarizmi Junior International Olympiad 2025 P7
Let $ABCD$ be a cyclic quadrilateral with circumcenter $O$, such that $CD$ is not a diameter of its circumcircle. The lines $AD$ and $BC$ intersect at point $P$, so that $A$ lies between $D$ and $P$, and $B$ lies between $C$ and $P$. Suppose triangle $PCD$ is acute and let $H$ be its orthocenter. The points $E$ and $F$ on the lines $BC$ and $AD$, respectively, are such that $BD \parallel HE$ and $AC\parallel HF$. The line through $E$, perpendicular to $BC$, intersects $AD$ at $L$, and the line through $F$, perpendicular to $AD$, intersects $BC$ at $K$. Prove that the points $K$, $L$, $O$ are collinear.

Amir Parsa Hosseini Nayeri, Iran
0 replies
Assassino9931
2 hours ago
0 replies
Prime sums of pairs
Assassino9931   0
2 hours ago
Source: Al-Khwarizmi Junior International Olympiad 2025 P5
Sevara writes in red $8$ distinct positive integers and then writes in blue the $28$ sums of each two red numbers. At most how many of the blue numbers can be prime?

Marin Hristov, Bulgaria
0 replies
Assassino9931
2 hours ago
0 replies
help me solve this problem. Thanks
tnhan.129   0
2 hours ago
Find f:R+ -> R such that:
(x+1/x).f(y) = f(xy) + f(y/x)
0 replies
tnhan.129
2 hours ago
0 replies
Floor double summation
CyclicISLscelesTrapezoid   52
N Apr 23, 2025 by lpieleanu
Source: ISL 2021 A2
Which positive integers $n$ make the equation \[\sum_{i=1}^n \sum_{j=1}^n \left\lfloor \frac{ij}{n+1} \right\rfloor=\frac{n^2(n-1)}{4}\]true?
52 replies
CyclicISLscelesTrapezoid
Jul 12, 2022
lpieleanu
Apr 23, 2025
Floor double summation
G H J
Source: ISL 2021 A2
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
huashiliao2020
1292 posts
#41 • 1 Y
Y by cubres
Nice! A bit on the easy side of A2s imo

The answer is $n+1$ prime; the key is to see $$\sum_{i=1}^n \sum_{j=1}^n \frac{ij}{n+1} = \frac{1}{n+1} \left( 1+2+\dots+n \right)^2 = \frac{n^2(n+1)}{4}\implies\sum_{i=1}^n \sum_{j=1}^n \left\lfloor \frac{ij}{n+1} \right\rfloor=\frac{n^2(n-1)}{4}\iff\sum_{i=1}^n \sum_{j=1}^n \left\{ \frac{ij}{n+1} \right\} = \frac{n^2}{2}.$$Indeed, $$\left\{ \frac{ij}{n+1} \right\} + \left\{ \frac{i(n+1-j)}{n+1} \right\} =\{ 1 \forall n+1 \nmid ij, 0\forall n+1\mid ij\}.$$By pairing, we deduce that we need $n+1\nmid ij$ always; in particular, we must have $n+1$ is prime. $\blacksquare$
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
#42 • 1 Y
Y by cubres
We claim that this is true if and only if $n+1,$ is prime.

Note, that $\sum_{i=1}^n \sum_{j=1}^n \frac{ij}{n+1}=\sum_{i=1}^n \frac{i(1+2+3+4+5+......+n)}{n+1}=\frac{(1+2+3+4+5+.....+n)^2}{n+1}=\frac{\frac{(n(n+1))^2}{4}}{n+1}=\frac{(n+1)\cdot n^2}{4}.$ Now, let $\left \{x\right\}=x-\lfloor x \rfloor$ note that $\sum_{i=1}^n \sum_{j=1}^n \left\{ \frac{ij}{n+1}\right\}=\frac{(n+1) \cdot n^2}{4}-\frac{(n-1)\cdot n^2}{4}=\frac{n^2}{2},$ next $\left\{\frac{ij}{n+1}\right\} + \left \{\frac{i(n+1-j)}{n+1}\right\},$ is $0$ if and only if $\frac{ij}{n+1}$ is an integer, but then contradicion so $n+1$ is prime.
This post has been edited 2 times. Last edited by mathmax12, Sep 14, 2023, 8:27 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
john0512
4187 posts
#43 • 1 Y
Y by cubres
The answer is when $n+1$ is prime. Multiply the equation by $n+1$ to get $$\sum ij-\sum (ij\pmod{n+1})=\frac{n^2(n+1)(n-1)}{4}.$$Of course, we have $$\sum ij = (\frac{n(n+1)}{2})^2,$$so this simply becomes $$\sum (ij\pmod{n+1})=\frac{n^2(n+1)}{2}.$$
Looking carefully at this statement, this is saying that the "average" residue in the multiplication table mod $n+1$ is $\frac{n+1}{2}$, aka the average of all distinct nonzero residues. If $n+1$ is prime this is clearly true as each row contains each nonzero residue exactly once.

This "summing by row" method motivates the following claim:

\begin{claim}
Fix $i$. Then, we have $$\sum_{1\leq j\leq n}(ij\pmod{n+1})\leq n\times \frac{n+1}{2}$$with equality if and only if $i$ is relatively prime to $n+1$.
\end{claim}

\begin{proof}
Every nonzero residue that is a multiple of $\gcd(i,n+1)$ shows up a $\gcd(i,n+1)$ times. Let this be $d$. Then, the total sum is $$d\times d(\frac{(\frac{n+1}{d}-1)(\frac{n+1}{d})}{2})=\frac{(n+1-d)(n+1)}{2}\leq \frac{n(n+1)}{2}$$with equality only when $d=1$.
\end{proof}

Summing this over all $i$, we get that all such $i$ need to be relatively prime to $n+1$. Hence, $n+1$ must be prime.
This post has been edited 1 time. Last edited by john0512, Nov 29, 2023, 4:38 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
blackbluecar
303 posts
#44 • 1 Y
Y by cubres
We note that \[ \frac{n^2(n-1)}{4} = \sum_{i=1}^n \sum_{j=1}^n \left\lfloor \frac{ij}{n+1} \right\rfloor = \sum_{i=1}^n \sum_{j=1}^n \frac{ij}{n+1} - \sum_{i=1}^n \sum_{j=1}^n\left \{ \frac{ij}{n+1} \right \} \]First, we have \[ \sum_{i=1}^n \sum_{j=1}^n \frac{ij}{n+1} = \sum_{i=1}^n \left ( \frac{i+2i+ \cdots +ni}{n+1} \right ) = \sum_{i=1}^n \frac{i}{n+1} \cdot \frac{n(n+1)}{2} = \sum_{i=1}^n \frac{in}{2} = \frac{n}{2} \cdot \frac{n(n+1)}{2} = \frac{n^2(n+1)}{4} \]
Thus, \[ \frac{n^2(n-1)}{4} = \frac{n^2(n+1)}{4} - \sum_{i=1}^n \sum_{j=1}^n\left \{ \frac{ij}{n+1} \right \} \Longleftrightarrow \sum_{i=1}^n \sum_{j=1}^n\left \{ \frac{ij}{n+1} \right \} = \frac{n^2}{2} \]
Claim: $\sum_{i=1}^n\left \{ \frac{ki}{n+1} \right \} \leq \frac{n}{2}$ with equality only at $\gcd(k,n+1)=1$.

Assume $\gcd(k,n+1)=d$. We note that \[ \sum_{i=1}^n \left \{ \frac{ki}{n+1} \right \} = d \cdot \sum_{i=1}^{\frac{n+1}{d}}  \frac{i}{(n+1)/d} = \frac{n-d+1}{2} \leq \frac{n}{2}\]with obvious only equality case at $d=1$ as desired. $\square$

Since \[ \frac{n^2}{2} = \sum_{i=1}^n \sum_{j=1}^n\left \{ \frac{ij}{n+1} \right \} \leq n \cdot \frac{n}{2}\]which implies that equality holds for each inequality above. Thus, if $k < n+1$ then $\gcd(k,n+1)=1$ which is equivalent to $n+1$ being prime.
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
#47 • 1 Y
Y by cubres
The answer is $\boxed{n + 1 \text{ prime}}$.

We cry. Split the double sum into integer and fractional parts so that we have,
\begin{align*}
\sum_{i = 1}^n \sum_{j = 1}^n \left\{ \frac{ij}{n+1} \right\} &=  \sum_{i = 1}^n \sum_{j = 1}^n\left( \frac{ij}{n+1} \right) - \frac{n^2(n-1)}{4}\\
&= \sum_{i=1}^n \frac{n \cdot i}{2} - \frac{n^2(n-1)}{4}\\
&= \frac{n^2(n+1)}{4} - \frac{n^2(n - 1)}{4}\\
&= \frac{n^2}{2}
\end{align*}Now interpret the fractional part thing as follows. We really just need,
\begin{align*}
\sum_{i=1}^n \sum_{j=1}^n (ij \bmod{n + 1}) &= \frac{n^2(n+1)}{2}
\end{align*}Note that,
\begin{align*}
ij + i(n + 1 -j) \equiv 0 \pmod{n+1}
\end{align*}For $n+1 \nmid ij$ we find that neither term is $0 \bmod n + 1$ and hence we have,
\begin{align*}
\left[ij \bmod{n+1}\right] + \left[i(n + 1 - j) \bmod{n+1}\right] = n + 1
\end{align*}for $n + 1 \nmid ij$. Otherwise if $n + 1 \mid ij$ clearly both terms are individually $0$ so they contribute $0$ to the sum. Thus let us define,
\begin{align*}
f(i, j) = \begin{cases} n+1 & n+1 \nmid ij \\ 0 & n + 1 \mid ij \end{cases} 
\end{align*}Now our double sum then evaluates to,
\begin{align*}
\sum_{i=1}^n \sum_{j=1}^n (ij \bmod{n + 1}) = \sum_{(i, j)} f(i, j)
\end{align*}Note then that,
\begin{align*}
\sum_{(i, j)} f(i, j) \leq \frac{n^2(n + 1)}{2}
\end{align*}with equality if and only if every $(i, j)$ contributes $n + 1$. This happens precisely when $n + 1 \mid ij$ never occurs. Thus we need the condition $n + 1$ prime as claimed.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
EpicBird08
1751 posts
#48 • 1 Y
Y by cubres
We require that $n+1$ is a prime.

We first rewrite the equation as
\[
\sum_{i=1}^n \sum_{j=1}^n \left\{\frac{ij}{n+1}\right\} = \frac{n^2}{2}.
\]Multiplying both sides by $n+1,$ if $f(k)$ is the remainder when $k$ is divided by $n+1,$ then we get
\[
\sum_{i=1}^n \sum_{j=1}^n f(ij) = \frac{n^2(n+1)}{2}.
\]For a fixed $i,$ consider the sequence $0,i,2i,\dots,ni.$ If we let $\gcd(n+1,i) = d,$ then this sequence is just $d$ copies of $0,d,2d,\dots,n+1-d,$ each of which has sum $d \cdot \frac{\frac{n+1}{d} \cdot \left(\frac{n+1}{d} - 1\right)}{2},$ which gives
\[
\frac{(n+1)(n+1-d)}{2}.
\]If we sum up over all $i,$ this becomes
\[
\frac{n+1}{2} \cdot \sum_{i=1}^n (n+1-\gcd(n+1,i)).
\]Spliting the sum gives
\[
\frac{n+1}{2} \cdot (n(n+1) - \sum_{i=1}^n \gcd(n+1,i)).
\]The sum on the right is at least equal to $n,$ so the entire sum is at most equal to
\[
\frac{n+1}{2} \cdot (n(n+1) - n) = \frac{n^2(n+1)}{2}.
\]Equality is achieved if and only if all of the gcd's are equal to $1,$ which happens if and only if $n+1$ is prime.

Therefore, since all our steps are reversible, $n+1$ being prime is necessary and sufficient.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
trk08
614 posts
#49 • 1 Y
Y by cubres
We claim the answer is all $n$ such that $n+1$ is prime. To start, rewrite the equation as:
\[\sum_{i,j=1}^{n}{\frac{ij}{n+1}}-\sum_{i,j=1}^{n}{\left\lfloor\frac{ij}{n+1}\right\rfloor}=\frac{n^2(n-1)}{4}\]\[\frac{n^2(n+1)}{4}-\sum_{i,j=1}^{n}{\left\lfloor\frac{ij}{n+1}\right\rfloor}=\frac{n^2(n-1)}{4}\]\[\sum_{i,j=1}^{n}{\left\lfloor\frac{ij}{n+1}\right\rfloor}=\frac{n^2}{2}.\]
Lemma:
For constants $a,k$, if $\gcd (a,k)=1$, then $ab\pmod{k}$ contains all residues modulo $k$ for $b\in \{0,1,\dots,k-1\}$.

Let $d_i=\gcd (n+1,i)$. We make the following claim:
Claim:
\[\sum_{i,j=1}^{n}{\left\lfloor\frac{ij}{n+1}\right\rfloor}=\frac{1}{n+1}\cdot\sum_{i=1}^{n}{\frac{(n+1)(n+1-d_i)}{2}}\]Proof:
For now, disregard the denominator of $n+1$. This means we are looking at $ij \pmod{n+1}$. Fix $i$. To find the sum of the residues, such that $j\in S=\{0,1,\dots,n\}$, we factor out $d_i$. This results in the sum being:
\[d_i\cdot \sum_{j\in S}{\frac{i}{d_i}\cdot j\pmod{\frac{n+1}{d_i}}}.\]Using our previous lemma, this is:
\[d_i^2\cdot \frac{\left(\frac{n+1}{d_i}-1\right)\left(\frac{n+1}{d_i}\right)}{2}\]\[\frac{(n+1)(n+1-d_i)}{2}\text{  }\square\]
Summing over all $i$, we get the sum being:
\[\frac{1}{n+1}\sum_{i\in S}{\frac{(n+1)(n+1-d_i)}{2}}\leq \frac{1}{n+1}\sum_{i\in S}{\frac{(n+1)(n)}{2}}\leq \frac{n^2}{2},\]with equality occuring iff $d_i=1\text{ }\forall i\in S$, implying that $n+1$ must be prime, 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.
Mr.Sharkman
500 posts
#50 • 1 Y
Y by cubres
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Sammy27
82 posts
#51 • 2 Y
Y by Eka01, cubres
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
onyqz
195 posts
#52 • 1 Y
Y by cubres
Quite easy actually
solution

Remark: Proving the identity was actually a problem, that appeared as a P6 in the German Federal Round just a few years ago.
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
#53 • 1 Y
Y by cubres
Just pairing lol
Note that $$\sum_{i=1}^n \sum_{j=1}^n \frac{ij}{n+1} = \frac{1}{n+1} \cdot \left( \frac{n(n+1)}{2} \right)^2 = \frac{n^2(n+1)}{4}.$$Therefore, we just need to have $$\sum_{i=1}^n \sum_{j=1}^n \left \{ \frac{ij}{n+1} \right \} = \frac{n^2}{2}.$$But this becomes $$n^2 = 2\sum_{i=1}^n \sum_{j=1}^n \left \{ \frac{ij}{n+1} \right \} = \sum_{i=1}^n \sum_{j=1}^n \left(\left \{ \frac{ij}{n+1} \right \} + \left\{ \frac{(n+1-i)j}{n+1} \right \} \right) = \sum_{i=1}^n \sum_{j=1}^n \left( \left \{ \frac{ij}{n+1} \right \} + \left\{ \frac{-ij}{n+1} \right \} \right).$$There are $n^2$ of these terms in total, and note that if $\frac{ij}{n+1}$ was an integer, then clearly $$\left \{ \frac{ij}{n+1} \right \} + \left\{ \frac{-ij}{n+1} \right \}$$becomes $0.$ Otherwise, it becomes $1.$ Hence, for $1 \leq i, j \leq n,$ $$\frac{ij}{n+1}$$cannot be an integer. Clearly, if $n+1$ is prime this works, but if $n+1=mn$ for $m, n \geq 2$ then we can just let $(i, j) = (m, n),$ so $n+1$ cannot be composite. Hence, only $n$ such that $n+1$ is prime works.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
eg4334
637 posts
#54 • 1 Y
Y by cubres
The only $n$ are when $\boxed{n+1 = p}$ is prime. First we tackle the case where $n$ is even. We can pair up the floors based on $i$: \begin{align*}
S &= \sum_{i = 1}^{\frac{n}{2}} \sum_{j=1}^n \left( \lfloor \frac{ij}{n+1} \rfloor + \lfloor \frac{(n+1-i)j}{n+1} \rfloor \right) \\
&= \sum_{i=1}^{\frac{n}{2}} \sum_{j=1}^n \left( \frac{n(n+1)}{2} + \lfloor \frac{ij}{n+1} \rfloor + \lfloor - \frac{ij}{n+1} \rfloor \right) \\
&= \frac{n^2(n+1)}{4} + \sum_{i=1}^{\frac{n}{2}} \sum_{j=1}^n \left( \lfloor \frac{ij}{n+1} \rfloor + \lfloor - \frac{ij}{n+1} \rfloor \right) 
\end{align*}Notice that each sum of floors is $0$ when $\frac{ij}{n+1}$ is an integer and $-1$ otherwise. If all the terms are not integers, we get $\frac{n^2(n+1)}{4} - n \cdot \frac{n}{2} = \frac{n^2(n-1)}{4}$, perfect. But this only happens when $n+1$ is prime obviouly. Otherwise, there must exist some $ij$ that is a multiple of $n+1$, and our sum must be greater than the desired which is a contradiction.

Otherwise, $n \equiv 1 \pmod{4}$. Then by an identical argument the minimum possible sum is $\frac{n(n+1)}{2} \cdot \frac{n-1}{2} + \frac{n^2-1}{4} - n \cdot \frac{n-1}{2} = \frac{n^3}{4} - \frac{n^2}{4} + \frac{n}{4} - \frac14$ which is too big and thus this case cannot happen. Therefore we have exhausted all cases and are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ilikeminecraft
626 posts
#55 • 1 Y
Y by cubres
very cool

Note that $\lfloor x \rfloor = x - \{x\}.$ Thus, we can rewrite our LHS as:
\begin{align*}
    \sum_{i = 1}^n \sum_{j = 1}^n \left\lfloor \frac{ij}{n+1} \right\rfloor & = \sum_{i = 1}^n \sum_{j = 1}\frac{ij}{n + 1} - \left\{\frac{ij}{n+1} \right\} \\
    & = \frac{n^2(n + 1)}{4} - \sum_{i = 1}^n \sum_{j = 1}^n \left\{\frac{ij}{n + 1}\right\}
\end{align*}Now we do casework on if $n + 1$ is prime. If $n + 1$ is prime, it follows that each residue modulo $n + 1$ is covered in the sum exactly $n$ times. Thus, the sum simplifies to:
\begin{align*}
    \frac{n^2(n + 1)}{4} - \sum_{i = 1}^n \sum_{j = 1}^n \left\{\frac{ij}{n + 1}\right\} & = \frac{n^2(n + 1)}{4} - n\cdot \sum_{j = 1}^n \frac j{n + 1} \\
    & = \frac{n^2(n + 1)}{4} - \frac{n^2}2 \\
    & = \frac{n^2(n - 1)}{4}
\end{align*}Now, assunme that $n + 1$ is composite. It can be seen that at $(i, n + 1) = 1,$ we have that the sum is equivalent to $\frac{n}{2}.$ At $(i, n + 1) > 1,$ the sum is clearly less than $\frac n2$. Thus, $n + 1$ composite doesn't work.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cubres
119 posts
#56
Y by
Yapping
Storage - grinding ISL problems
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
lpieleanu
3001 posts
#57
Y by
Solution
Z K Y
N Quick Reply
G
H
=
a